Authored by 毕凯

npm 脚本可以检查所有文件

... ... @@ -31,7 +31,7 @@ const packageSort = argument => {
}
return newObj;
}
};
/**
* 生成签名
... ... @@ -46,7 +46,7 @@ const makeSign = argument => {
});
return md5(qs.join('&')).toLowerCase();
}
};
// 生成API签名,调用后端接口的时候有私钥校验
exports.apiSign = (params) => {
... ... @@ -91,4 +91,4 @@ exports.webSign = (params) => {
var webPrivateKey = 'yohobuyapp';
return params.key === md5(md5(webPrivateKey) + params.uid);
};
\ No newline at end of file
};
... ...
... ... @@ -12,6 +12,8 @@
"dev": "node_modules/.bin/nodemon -e js,hbs -i public/ app.js",
"online": "NODE_ENV=\"production\" node app.js",
"debug": "DEBUG=\"express:*\" node app.js",
"lint-js": "./node_modules/.bin/eslint -c .eslintrc --cache --fix .",
"lint-css": "./node_modules/.bin/stylelint --config .stylelintrc public/**/*.css",
"precommit": "node lint.js"
},
"license": "MIT",
... ...