crabatool 1.0.387 → 1.0.390

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
@@ -137,7 +137,7 @@ function checkFast(args) {
137
137
  if (args.includes('-mergejs')) {
138
138
  start.bindAndCheckConfig('-inNames');
139
139
  start.bindAndCheckConfig('-outName');
140
- start.bindAndCheckConfig('-targetPath');
140
+ start.bindConfigByArgv('-targetPath');
141
141
  start.bindConfigByArgv('-exp');
142
142
  require('./tool/compress.js').mergeJs(); // 打包压缩js和css
143
143
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.387",
3
+ "version": "1.0.390",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -20,6 +20,7 @@
20
20
  "checkUpdate": "node run.js -checkUpdate -version master -webPath F:\\crabaevery\\www",
21
21
  "upload": "node run.js -upload -version master -Debug true -host http://127.0.0.1:9998 -hidejspath true -targetPath F:\\CarpaNET_NEW",
22
22
  "crabaNgp": "node run.js -mergejs -hidejspath true -targetPath F:\\CarpaNET_NEW\\src\\Carpa.Web\\js\\crabaNgp -inNames initMs.js,businessControl.js -outName F:\\CarpaMS\\src\\js\\crabaNgp.js",
23
+ "mergeJs2":"node run.js -mergejs -targetPath -inNames F:\\CarpaNET_NEW\\src\\Carpa.Web\\js\\craba.js,F:\\CarpaNET_NEW\\src\\Carpa.Web\\js\\controls.js -outName F:\\a.js -ignorecompress true",
23
24
  "webPath": "node ./test/test.js -checkjs -webPath F:\\crabaevery\\www -modName crabaevery -Debug true",
24
25
  "biconfont": "node ./test/test.js -iconfont -zipPath F:\\crabaevery\\www\\biconfont -fontPath F:\\crabaevery\\www\\skins\\bicon -prefix .bicon- -fontName biconfont",
25
26
  "aiconfont": "node ./test/test.js -iconfont -zipPath F:\\crabaevery\\www\\iconfont -fontPath F:\\CarpaNET_NEW\\src\\Carpa.Web\\skins -prefix .aicon- -fontName iconfont",
package/tool/iconfont.js CHANGED
@@ -73,7 +73,7 @@ function zipOk(zipUrl) {
73
73
  utils.cleardirsSync(target);
74
74
  fs.unlinkSync(zipUrl);
75
75
 
76
- var ignores = ["run.bat", "readme.txt", "font.zip", "iconfont.css", "demo_index.html", "demo.css", "iconfont.json", "iconfont.woff2", "iconfont.js"];
76
+ var ignores = ["run.sh", "run.bat", "readme.txt", "font.zip", "iconfont.css", "demo_index.html", "demo.css", "iconfont.json", "iconfont.woff2", "iconfont.js"];
77
77
  // 从bicon下面拷贝文件到skins\bicon下面
78
78
  utils.copyFiles(config.zipPath, config.fontPath, ignores, utils.createDelegate(this, function(fileName) {
79
79
  utils.debug('拷贝文件', fileName);
package/tool/start.js CHANGED
@@ -130,7 +130,12 @@ class Start {
130
130
  if (arr.includes(key)) {
131
131
  var index = arr.indexOf(key);
132
132
  var value = arr[index + 1];
133
- if (!value) throw new Error(key + '参数缺少参数值');
133
+ if (!value) {
134
+ throw new Error(key + '参数缺少参数值');
135
+ }
136
+ if (value.startsWith('-')) {
137
+ value = '';
138
+ }
134
139
  key = key.substr(1);
135
140
 
136
141
  if (type == 'array') {
@@ -145,7 +150,7 @@ class Start {
145
150
  key = 'proxy';
146
151
  }
147
152
  // 特殊处理大小写问题
148
- if(key == 'ignorecompress'){
153
+ if (key == 'ignorecompress') {
149
154
  key = 'ignoreCompress';
150
155
  }
151
156
  config[key] = value;