crabatool 1.0.43 → 1.0.46

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
@@ -66,6 +66,11 @@ function checkConfig() {
66
66
  throw new Error('请检查craba.js,必须告诉工具当前项目前端服务器端口地址哦');
67
67
  }
68
68
 
69
+ // 支持相对路径
70
+ if (!path.isAbsolute(config.webPath)) {
71
+ config.webPath = path.join(process.cwd(), config.webPath);
72
+ }
73
+
69
74
  if (!fs.existsSync(config.webPath)) {
70
75
  throw new Error(`请检查craba.js,配置的webPath路径不存在,请检查拼写是否正确:${config.webPath}`);;
71
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.43",
3
+ "version": "1.0.46",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test/test.js CHANGED
@@ -9,7 +9,7 @@ var crabaTool = require('../index.js'); // 引入craba脚手架工具包
9
9
  var config = {
10
10
  //【必填】
11
11
  // 告诉工具当前项目的端路径地址,填绝对路径哦
12
- webPath: "F:/shell_master/web/src/main/resources/static/shell",
12
+ webPath: "../web/src/main/resources/static/shell",
13
13
 
14
14
  //【必填】
15
15
  // 告诉工具当前项目前端服务器端口地址