crabatool 1.0.48 → 1.0.51

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
@@ -28,6 +28,9 @@ module.exports.run = function(options) {
28
28
  }
29
29
  }
30
30
 
31
+
32
+ showLocalVersion();
33
+ console.log("---------------------------------------------------------------------------------------------------------");
31
34
  // 2. 开发环境让开发选择功能
32
35
  waitInput();
33
36
  }
@@ -81,10 +84,6 @@ function checkConfig() {
81
84
  if (!fs.existsSync(crabaJs)) {
82
85
  throw new Error('请检查craba.js,平台前端组件不存在,请检查指定的webPath路径是否为craba前端框架的根目录。' + crabaJs);
83
86
  }
84
-
85
- showLocalVersion();
86
-
87
- console.log("---------------------------------------------------------------------------------------------------------");
88
87
  }
89
88
 
90
89
 
package/lib/utils.js CHANGED
@@ -362,7 +362,10 @@ class Utils {
362
362
  var exts = options.exts;
363
363
  var source = options.source;
364
364
  if (options.ignores && !fileList) {
365
- options.ignores = options.ignores.map((item) => { return path.join(source, item) });
365
+ options.ignores = options.ignores.map((item) => {
366
+ item = item.replace(/\\/g, path.sep).replace(/\//g, path.sep);
367
+ return path.join(source, item);
368
+ });
366
369
  }
367
370
 
368
371
  if (!fileList) fileList = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.48",
3
+ "version": "1.0.51",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tool/upgrade.js CHANGED
@@ -73,6 +73,7 @@ class Upgrade {
73
73
  if (cb) cb();
74
74
  return;
75
75
  }
76
+ console.log('最新平台信息:', newData);
76
77
 
77
78
  this.done = this._updateDone;
78
79
  this.downloadCraba();
@@ -180,7 +181,7 @@ class Upgrade {
180
181
  var dest = this.projectPath;
181
182
  var source = config.CachePath;
182
183
  var ignores = ["server", "www"];
183
-
184
+ console.log("拷贝文件中..");
184
185
  utils.copyFiles(source, dest, ignores, utils.createDelegate(this, function(fileName) {
185
186
  this.pb.render({ value: ++this.pb.value, text: fileName });
186
187
  }));
@@ -193,7 +194,7 @@ class Upgrade {
193
194
  downloadFile(uri, filePath, callback) {
194
195
  if (!uri || !filePath) throw new Error('uri或filePath不能为空');
195
196
 
196
- //console.log('下载craba文件');
197
+ console.log('下载craba文件');
197
198
  var that = this;
198
199
  // 获取远端图片
199
200
  axios({