neo-cmp-cli 1.2.16 → 1.2.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -1,6 +1,7 @@
1
1
  const { aliBOS, baiduBOS } = require('akfun');
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
+ const _ = require('lodash');
4
5
  const { catchCurPackageJson } = require('../utils/pathUtils');
5
6
  const getConfigObj = require('../utils/getConfigObj');
6
7
  const updatePublishLog = require('../cmpUtils/updatePublishLog');
@@ -185,13 +186,25 @@ const getResultFilesByWidgetName = (files) => {
185
186
  return;
186
187
  }
187
188
  let widgetName = file.widgetName;
189
+ const curCmpInfo = {
190
+ 'cmpType': _.kebabCase(widgetName),
191
+ }
192
+
188
193
  if (widgetName.includes('Model')) {
189
194
  widgetName = widgetName.replace('Model', '');
195
+ curCmpInfo.cmpType = _.kebabCase(widgetName),
196
+ curCmpInfo.modelAsset = !file.success ? `${file.error}[${file.ossPath}]` : file.ossPath;
197
+ } else if (file.fileName.endsWith('.css')) {
198
+ curCmpInfo.cssAsset = !file.success ? `${file.error}[${file.ossPath}]` : file.ossPath;
199
+ } else {
200
+ curCmpInfo.asset = !file.success ? `${file.error}[${file.ossPath}]` : file.ossPath;
190
201
  }
202
+
191
203
  if (widgetFilesMap[widgetName]) {
192
- widgetFilesMap[widgetName].push(getResultFile(file));
204
+ widgetFilesMap[widgetName] = Object.assign(widgetFilesMap[widgetName], curCmpInfo);
193
205
  } else {
194
- widgetFilesMap[widgetName] = [getResultFile(file)];
206
+ // widgetFilesMap[widgetName] = [getResultFile(file)];
207
+ widgetFilesMap[widgetName] = curCmpInfo;
195
208
  }
196
209
  });
197
210
 
@@ -47,7 +47,7 @@
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.2.16",
50
+ "neo-cmp-cli": "^1.2.17",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5"
@@ -51,7 +51,7 @@
51
51
  "@types/react": "^16.9.11",
52
52
  "@types/react-dom": "^16.9.15",
53
53
  "@types/axios": "^0.14.0",
54
- "neo-cmp-cli": "^1.2.16",
54
+ "neo-cmp-cli": "^1.2.17",
55
55
  "husky": "^4.2.5",
56
56
  "lint-staged": "^10.2.9",
57
57
  "prettier": "^2.0.5"
@@ -47,7 +47,7 @@
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.2.16",
50
+ "neo-cmp-cli": "^1.2.17",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5",
@@ -101,6 +101,7 @@ module.exports = {
101
101
  },
102
102
  publish2oss: {
103
103
  // 用于构建并发布至 OSS 的相关配置
104
+ cssExtract: true, // 不额外提取css文件
104
105
  /*
105
106
  【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
106
107
  NODE_ENV: 'production',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-custom-cmp-template",
3
- "version": "1.1.2",
3
+ "version": "1.1.6",
4
4
  "description": "neo自定义组件模板(react&ts技术栈)",
5
5
  "keywords": [
6
6
  "自定义组件模板",
@@ -52,7 +52,7 @@
52
52
  "@types/react": "^16.9.11",
53
53
  "@types/react-dom": "^16.9.15",
54
54
  "@types/axios": "^0.14.0",
55
- "neo-cmp-cli": "^1.2.16",
55
+ "neo-cmp-cli": "^1.2.17",
56
56
  "husky": "^4.2.5",
57
57
  "lint-staged": "^10.2.9",
58
58
  "prettier": "^2.0.5"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.16",
47
+ "neo-cmp-cli": "^1.2.17",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5"
@@ -46,7 +46,7 @@
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
47
  "@types/react": "^16.9.11",
48
48
  "@types/react-dom": "^16.9.15",
49
- "neo-cmp-cli": "^1.2.16",
49
+ "neo-cmp-cli": "^1.2.17",
50
50
  "husky": "^4.2.5",
51
51
  "lint-staged": "^10.2.9",
52
52
  "prettier": "^2.0.5"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.16",
47
+ "neo-cmp-cli": "^1.2.17",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5",