crabatool 1.0.284 → 1.0.287

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
@@ -104,7 +104,7 @@ function checkFast(args) {
104
104
  start.bindAndCheckConfig('-inNames');
105
105
  start.bindAndCheckConfig('-outName');
106
106
  start.bindAndCheckConfig('-targetPath');
107
- start.bindAndCheckConfig('-exp');
107
+ start.bindConfigByArgv('-exp');
108
108
  require('./tool/compress.js').mergeJs(); // 打包压缩js和css
109
109
  return false;
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.284",
3
+ "version": "1.0.287",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {
package/tool/hash.js CHANGED
@@ -38,11 +38,12 @@ module.exports.start = function() {
38
38
  // 转为相对webPath的路径
39
39
  if (!isHttp) {
40
40
  f = path.resolve(f);
41
- f = f.replace(config.webPath, '');
41
+ var webPath = path.resolve(config.webPath);
42
+ f = f.replace(webPath, '');
42
43
  if (config.modName) {
43
44
  f = path.join(config.modName, f);
44
45
  }
45
- f = f.replace('\\', '/');
46
+ f = f.replace(/\\/g, '/');
46
47
  }
47
48
 
48
49
  // SRI Hash Generator