crabatool 1.0.405 → 1.0.406

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -129,6 +129,7 @@ function checkFast(args) {
129
129
  // 按替换规则给指定文件生成版本号
130
130
  if (args.includes('-addVersion')) {
131
131
  start.bindAndCheckConfig('-file');
132
+ start.bindAndCheckConfig('-exp');
132
133
  require('./tool/addVersion.js').run();
133
134
  return false;
134
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.405",
3
+ "version": "1.0.406",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "makeHash": "node run.js -makeHash -webPath ./test/ -modName craba -files http://crabadoc.ca.com/js/utils/utils.js,F:/newcrabadoc/www/js/utils/utils.js,./test/test.js,./test/beefun.js,https://s5.vip.wpscdn.cn/web-libs/2t/js/userinfo-collect/1.0.3/vas2t-userinfo-collect.min.js?a=1 -outJson ./hash.json -hashName sha384",
28
28
  "makeHash2": "node run.js -makeHash -webPath ./test/ -modName craba -files ./test/ -exts .js -outJson ./hash2.json -hashName sha384",
29
29
  "pageHash": "node run.js -pageHash /Test/TestMasterDetail.gspx",
30
- "addVersion":"node run.js -addVersion -file F:\\basicweb\\www\\index.html"
30
+ "addVersion":"node run.js -addVersion -file F:\\basicweb\\www\\index.html -exp AUTOVERSION"
31
31
  },
32
32
  "author": "wssf",
33
33
  "dependencies": {
@@ -9,7 +9,7 @@ module.exports.run = function() {
9
9
  throw new Error('file文件不存在');
10
10
  }
11
11
 
12
- var replaceStr = '$AutoVersion$';
12
+ var replaceStr = config.exp || 'AUTOVERSION'
13
13
  var content = fs.readFileSync(config.file).toString();
14
14
  var v = new Date().getTime();
15
15
  content = content.replace(replaceStr, v);