cloudcc-cli 0.9.5 → 0.9.6

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/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ # ReleaseV0.9.6
2
+ #### 发布日期:2022-2-14
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 优化
6
+ * 还原builderPlugin
7
+
1
8
  # ReleaseV0.9.5
2
9
  #### 发布日期:2022-2-10
3
10
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -87,23 +87,20 @@ class Builder {
87
87
  */
88
88
  getVueValue(buildFileName) {
89
89
  let vueContent = fs.readFileSync(this.getVueContent(buildFileName), 'utf8');
90
-
91
- // 获取componentInfo
92
- let reg = /componentInfo([\s\S]*?)\}/;
93
- let componentInfo = vueContent.match(reg)[1].split("{")[1];
94
- componentInfo = eval(`(${"function getInfo() { return {" + componentInfo + " } }"})`)()
95
- // 组件名字
96
- let compName = componentInfo.component
97
- // 组件类型
98
- let bizType = componentInfo.bizType
99
- // 组件描述
100
- let compDesc = componentInfo.compDesc
101
- // 组件状态
102
- let category = componentInfo.category
103
-
104
- // 获取vueDate内容
105
- let vueData = vueContent.split("data()")[1].split("return")[1].split("isLock:")[0] + "isLock:false,}";
106
-
90
+ let vueData = vueContent + ""
91
+ // 去除空格
92
+ // vueData = vueData.replace(/\ +/g, "")
93
+ // 去除换行
94
+ // vueData =vueData.replace(/[\r\n]/g, "");
95
+ vueData = vueData.split("data()")[1].split("isLock:")[0] + "isLock:false,};}";
96
+ vueData = "function data()" + vueData;
97
+ const data = eval(`(${vueData})`)()
98
+ let compName = data.componentInfo.component // 组件名字
99
+ vueData = JSON.stringify(data);
100
+ let bizType = data.componentInfo.bizType // 组件类型
101
+ let compDesc = data.componentInfo.compDesc // 组件描述
102
+ let category = data.componentInfo.category // 组件状态
103
+ console.log("vueData", vueData);
107
104
  return { compName, vueContent, vueData, bizType, compDesc, category }
108
105
  };
109
106
  /**