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 +1 -1
- package/package.json +1 -1
- package/tool/hash.js +3 -2
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.
|
|
107
|
+
start.bindConfigByArgv('-exp');
|
|
108
108
|
require('./tool/compress.js').mergeJs(); // 打包压缩js和css
|
|
109
109
|
return false;
|
|
110
110
|
}
|
package/package.json
CHANGED
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
|
-
|
|
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
|