neo-cmp-cli 1.6.5 → 1.6.7
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 +1 -1
- package/src/initData/neo.config.js +1 -1
- package/src/neo/neoService.js +5 -1
- package/src/template/antd-custom-cmp-template/neo.config.js +1 -1
- package/src/template/antd-custom-cmp-template/package.json +2 -2
- package/src/template/antd-custom-cmp-template/src/components/{data-dashboard → dataDashboard}/model.ts +1 -1
- package/src/template/antd-custom-cmp-template/src/components/{info-card → infoCard}/model.ts +1 -1
- package/src/template/echarts-custom-cmp-template/package.json +2 -2
- package/src/template/empty-custom-cmp-template/neo.config.js +1 -1
- package/src/template/empty-custom-cmp-template/package.json +2 -2
- package/src/template/neo-custom-cmp-template/neo.config.js +1 -1
- package/src/template/neo-custom-cmp-template/package.json +2 -2
- package/src/template/neo-custom-cmp-template/src/components/{entity-card-list → entityCardList}/model.ts +1 -1
- package/src/template/neo-custom-cmp-template/src/components/{entity-detail → entityDetail}/model.ts +1 -1
- package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/model.ts +1 -1
- package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/model.ts +1 -1
- package/src/template/react-custom-cmp-template/neo.config.js +1 -1
- package/src/template/react-custom-cmp-template/package.json +2 -2
- package/src/template/react-custom-cmp-template/src/components/{info-card → infoCard}/model.js +1 -1
- package/src/template/react-ts-custom-cmp-template/neo.config.js +1 -1
- package/src/template/react-ts-custom-cmp-template/package.json +2 -2
- package/src/template/react-ts-custom-cmp-template/src/components/{list-widget → listWidget}/model.ts +1 -1
- package/src/template/vue2-custom-cmp-template/neo.config.js +1 -1
- package/src/template/vue2-custom-cmp-template/package.json +2 -2
- package/src/template/vue2-custom-cmp-template/src/components/{vue-info-card → vueInfoCard}/model.js +1 -1
- package/src/utils/autoEntryRootDir.js +1 -1
- package/src/utils/cmpUtils/createCmpByZip.js +1 -3
- package/src/utils/cmpUtils/getCmpPreviewCode.js +4 -1
- package/src/utils/common.js +3 -3
- package/src/utils/projectUtils/getEntriesWithAutoRegister.js +2 -2
- /package/src/template/antd-custom-cmp-template/src/components/{data-dashboard → dataDashboard}/README.md +0 -0
- /package/src/template/antd-custom-cmp-template/src/components/{data-dashboard → dataDashboard}/index.tsx +0 -0
- /package/src/template/antd-custom-cmp-template/src/components/{data-dashboard → dataDashboard}/style.scss +0 -0
- /package/src/template/antd-custom-cmp-template/src/components/{info-card → infoCard}/index.tsx +0 -0
- /package/src/template/antd-custom-cmp-template/src/components/{info-card → infoCard}/style.scss +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-card-list → contactCardList}/README.md +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-card-list → contactCardList}/index.tsx +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-card-list → contactCardList}/model.ts +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-card-list → contactCardList}/style.scss +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-form → contactForm}/README.md +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-form → contactForm}/index.tsx +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-form → contactForm}/model.ts +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{contact-form → contactForm}/style.scss +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{neo-entity-grid → neoEntityGrid}/README.md +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{neo-entity-grid → neoEntityGrid}/index.tsx +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{neo-entity-grid → neoEntityGrid}/model.ts +0 -0
- /package/src/template/develop/neo-custom-cmp-template/src/components/{neo-entity-grid → neoEntityGrid}/style.scss +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{chart-widget → chartWidget}/README.md +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{chart-widget → chartWidget}/index.tsx +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{chart-widget → chartWidget}/model.ts +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{chart-widget → chartWidget}/style.scss +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/README.md +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/USAGE.md +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/index.tsx +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/model.ts +0 -0
- /package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/style.scss +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-card-list → entityCardList}/README.md +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-card-list → entityCardList}/index.tsx +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-card-list → entityCardList}/style.scss +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-detail → entityDetail}/README.md +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-detail → entityDetail}/index.tsx +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-detail → entityDetail}/style.scss +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/README.md +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/index.tsx +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/style.scss +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/README.md +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/index.tsx +0 -0
- /package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/style.scss +0 -0
- /package/src/template/react-custom-cmp-template/src/components/{info-card → infoCard}/index.jsx +0 -0
- /package/src/template/react-custom-cmp-template/src/components/{info-card → infoCard}/style.scss +0 -0
- /package/src/template/react-ts-custom-cmp-template/src/components/{list-widget → listWidget}/README.md +0 -0
- /package/src/template/react-ts-custom-cmp-template/src/components/{list-widget → listWidget}/index.tsx +0 -0
- /package/src/template/react-ts-custom-cmp-template/src/components/{list-widget → listWidget}/style.scss +0 -0
- /package/src/template/vue2-custom-cmp-template/src/components/{vue-info-card → vueInfoCard}/index.vue +0 -0
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ module.exports = {
|
|
|
43
43
|
neoCommonModule: {
|
|
44
44
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
45
45
|
neoExports: { // 对象写法
|
|
46
|
-
'
|
|
46
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
47
47
|
},
|
|
48
48
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
49
49
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
package/src/neo/neoService.js
CHANGED
|
@@ -147,7 +147,11 @@ class NeoService {
|
|
|
147
147
|
const { access_token, expires_in } = response.data || {};
|
|
148
148
|
|
|
149
149
|
if (!access_token) {
|
|
150
|
-
errorLog(
|
|
150
|
+
errorLog(
|
|
151
|
+
'获取 token 失败(授权配置错误):响应中未包含 access_token,' +
|
|
152
|
+
JSON.stringify(response.data),
|
|
153
|
+
spinner
|
|
154
|
+
);
|
|
151
155
|
process.exit(1);
|
|
152
156
|
}
|
|
153
157
|
|
|
@@ -43,7 +43,7 @@ module.exports = {
|
|
|
43
43
|
neoCommonModule: {
|
|
44
44
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
45
45
|
neoExports: { // 对象写法
|
|
46
|
-
'
|
|
46
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
47
47
|
},
|
|
48
48
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
49
49
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块(仅支持数组写法)
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/antd-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0.
|
|
41
|
+
"neo-register": "^1.0.6",
|
|
42
42
|
"antd": "4.9.4",
|
|
43
43
|
"react": "^16.9.0",
|
|
44
44
|
"react-dom": "^16.9.0"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@commitlint/config-conventional": "^9.1.1",
|
|
49
49
|
"@types/react": "^16.9.11",
|
|
50
50
|
"@types/react-dom": "^16.9.15",
|
|
51
|
-
"neo-cmp-cli": "^1.6.
|
|
51
|
+
"neo-cmp-cli": "^1.6.7",
|
|
52
52
|
"husky": "^4.2.5",
|
|
53
53
|
"lint-staged": "^10.2.9",
|
|
54
54
|
"prettier": "^2.0.5"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/echarts-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0.
|
|
41
|
+
"neo-register": "^1.0.6",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0",
|
|
44
44
|
"echarts": "^5.5.1"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@commitlint/config-conventional": "^9.1.1",
|
|
49
49
|
"@types/react": "^16.9.11",
|
|
50
50
|
"@types/react-dom": "^16.9.15",
|
|
51
|
-
"neo-cmp-cli": "^1.6.
|
|
51
|
+
"neo-cmp-cli": "^1.6.7",
|
|
52
52
|
"husky": "^4.2.5",
|
|
53
53
|
"lint-staged": "^10.2.9",
|
|
54
54
|
"prettier": "^2.0.5",
|
|
@@ -43,7 +43,7 @@ module.exports = {
|
|
|
43
43
|
neoCommonModule: {
|
|
44
44
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
45
45
|
neoExports: { // 对象写法
|
|
46
|
-
'
|
|
46
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
47
47
|
},
|
|
48
48
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
49
49
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "https://github.com/wibetter/empty-custom-cmp-template/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"neo-register": "^1.0.
|
|
40
|
+
"neo-register": "^1.0.6",
|
|
41
41
|
"react": "^16.9.0",
|
|
42
42
|
"react-dom": "^16.9.0"
|
|
43
43
|
},
|
|
@@ -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.6.
|
|
49
|
+
"neo-cmp-cli": "^1.6.7",
|
|
50
50
|
"husky": "^4.2.5",
|
|
51
51
|
"lint-staged": "^10.2.9",
|
|
52
52
|
"prettier": "^2.0.5"
|
|
@@ -51,7 +51,7 @@ module.exports = {
|
|
|
51
51
|
neoCommonModule: {
|
|
52
52
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
53
53
|
neoExports: { // 对象写法
|
|
54
|
-
'
|
|
54
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
55
55
|
},
|
|
56
56
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
57
57
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/neo-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0.
|
|
41
|
+
"neo-register": "^1.0.6",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0",
|
|
44
44
|
"axios": "^0.27.2",
|
|
@@ -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.6.
|
|
55
|
+
"neo-cmp-cli": "^1.6.7",
|
|
56
56
|
"husky": "^4.2.5",
|
|
57
57
|
"lint-staged": "^10.2.9",
|
|
58
58
|
"prettier": "^2.0.5"
|
|
@@ -47,7 +47,7 @@ module.exports = {
|
|
|
47
47
|
neoCommonModule: {
|
|
48
48
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
49
49
|
neoExports: { // 对象写法
|
|
50
|
-
'
|
|
50
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
51
51
|
},
|
|
52
52
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
53
53
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/react-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0.
|
|
41
|
+
"neo-register": "^1.0.6",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@commitlint/cli": "^8.3.5",
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
|
-
"neo-cmp-cli": "^1.6.
|
|
48
|
+
"neo-cmp-cli": "^1.6.7",
|
|
49
49
|
"husky": "^4.2.5",
|
|
50
50
|
"lint-staged": "^10.2.9",
|
|
51
51
|
"prettier": "^2.0.5"
|
|
@@ -43,7 +43,7 @@ module.exports = {
|
|
|
43
43
|
neoCommonModule: {
|
|
44
44
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
45
45
|
neoExports: { // 对象写法
|
|
46
|
-
'
|
|
46
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
47
47
|
},
|
|
48
48
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
49
49
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/react-ts-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0.
|
|
41
|
+
"neo-register": "^1.0.6",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0"
|
|
44
44
|
},
|
|
@@ -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.6.
|
|
50
|
+
"neo-cmp-cli": "^1.6.7",
|
|
51
51
|
"husky": "^4.2.5",
|
|
52
52
|
"lint-staged": "^10.2.9",
|
|
53
53
|
"prettier": "^2.0.5"
|
|
@@ -52,7 +52,7 @@ module.exports = {
|
|
|
52
52
|
neoCommonModule: {
|
|
53
53
|
// neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
|
|
54
54
|
neoExports: { // 对象写法
|
|
55
|
-
'
|
|
55
|
+
'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
|
|
56
56
|
},
|
|
57
57
|
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
|
|
58
58
|
// neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/vue2-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0.
|
|
41
|
+
"neo-register": "^1.0.6",
|
|
42
42
|
"vue": "^2.6.14",
|
|
43
43
|
"element-ui": "^2.15.12"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@commitlint/cli": "^8.3.5",
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
|
-
"neo-cmp-cli": "^1.6.
|
|
48
|
+
"neo-cmp-cli": "^1.6.7",
|
|
49
49
|
"husky": "^4.2.5",
|
|
50
50
|
"lint-staged": "^10.2.9",
|
|
51
51
|
"prettier": "^2.0.5",
|
|
@@ -62,7 +62,7 @@ module.exports = function (projectPath, options = {}) {
|
|
|
62
62
|
|
|
63
63
|
// 输出 shell 命令让用户执行(这样可以真正改变 shell 的工作目录)
|
|
64
64
|
if (outputShellCommand) {
|
|
65
|
-
const command = `
|
|
65
|
+
const command = `neo open -n ${projectName}`;
|
|
66
66
|
// 输出提示信息
|
|
67
67
|
console.log('\n' + '='.repeat(60));
|
|
68
68
|
console.log('💡 提示:要切换到项目目录,请执行以下命令:');
|
|
@@ -273,9 +273,7 @@ module.exports = async function (cmpZipUrl, cmpName, componentBaseDir = './src/c
|
|
|
273
273
|
const newDeps = Object.keys(newPackageJsonDeps);
|
|
274
274
|
if (newDeps.length > 0) {
|
|
275
275
|
warningLog(
|
|
276
|
-
`检测到 package.json 中新增了 ${
|
|
277
|
-
newDeps.length
|
|
278
|
-
} 个依赖包:${newDeps.join(', ')}`
|
|
276
|
+
`检测到 package.json 中新增了 ${newDeps.length} 个依赖包:${newDeps.join(', ')}`
|
|
279
277
|
);
|
|
280
278
|
warningLog(
|
|
281
279
|
`为确保组件正常运行,请执行以下命令安装依赖:npm install 或 yarn install`
|
|
@@ -21,6 +21,7 @@ const getCmpPreviewCode = (cmpsDir, cmpName) => {
|
|
|
21
21
|
return `
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
import ReactDOM from 'react-dom';
|
|
24
|
+
import { autoConvertVueComponent } from 'neo-register';
|
|
24
25
|
import CustomCmp from '${cpmDir}';
|
|
25
26
|
import CustomCmpModel from '${cpmModelDir}';
|
|
26
27
|
|
|
@@ -29,9 +30,11 @@ const curDefaultComProps = new CustomCmpModel().defaultComProps;
|
|
|
29
30
|
const previewComProps = new CustomCmpModel().previewComProps;
|
|
30
31
|
const curPreviewComProps = Object.assign(curDefaultComProps, previewComProps);
|
|
31
32
|
|
|
33
|
+
const newCustomCmp = autoConvertVueComponent(CustomCmp);
|
|
34
|
+
|
|
32
35
|
// 预览 自定义组件
|
|
33
36
|
ReactDOM.render(
|
|
34
|
-
<
|
|
37
|
+
<newCustomCmp {...curPreviewComProps} />,
|
|
35
38
|
document.getElementById('root'),
|
|
36
39
|
);
|
|
37
40
|
`;
|
package/src/utils/common.js
CHANGED
|
@@ -51,7 +51,7 @@ function errorLog(message, spinner) {
|
|
|
51
51
|
const errorMessage = `${consoleTag} ${chalk.red(message)}`;
|
|
52
52
|
if (spinner) {
|
|
53
53
|
spinner.fail(errorMessage);
|
|
54
|
-
} else {
|
|
54
|
+
} else {
|
|
55
55
|
console.error(errorMessage);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -84,11 +84,11 @@ function successLog(message, spinner) {
|
|
|
84
84
|
function parseTsConfigWithTypeScript(configPath) {
|
|
85
85
|
try {
|
|
86
86
|
const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
if (configFile.error) {
|
|
89
89
|
throw new Error(`解析 tsconfig.json 失败: ${configFile.error.messageText}`);
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
return configFile.config;
|
|
93
93
|
} catch (error) {
|
|
94
94
|
if (error.code === 'MODULE_NOT_FOUND') {
|
|
@@ -63,10 +63,10 @@ module.exports = (defaultComponentsDir = './src/components', cmpType) => {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
fs.readdirSync(widgetPath)
|
|
66
|
-
.filter((file) => file.match(/
|
|
66
|
+
.filter((file) => file.match(/(index|model)\.(tsx?|jsx?|vue)$/))
|
|
67
67
|
.map((file) => path.join(defaultComponentsDir, curCmpName, file))
|
|
68
68
|
.forEach((filePath) => {
|
|
69
|
-
if (filePath.match(/index\.
|
|
69
|
+
if (filePath.match(/index\.(tsx?|jsx?|vue)$/)) {
|
|
70
70
|
// 自动创建对应的注册文件
|
|
71
71
|
const registerContent = getCmpRegisterCode(componentsBaseDir, curCmpName);
|
|
72
72
|
const registerDir = `${cmpTempDir}/register.js`;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/template/antd-custom-cmp-template/src/components/{info-card → infoCard}/index.tsx
RENAMED
|
File without changes
|
/package/src/template/antd-custom-cmp-template/src/components/{info-card → infoCard}/style.scss
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/README.md
RENAMED
|
File without changes
|
/package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/USAGE.md
RENAMED
|
File without changes
|
/package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/index.tsx
RENAMED
|
File without changes
|
/package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/model.ts
RENAMED
|
File without changes
|
/package/src/template/echarts-custom-cmp-template/src/components/{map-widget → mapWidget}/style.scss
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/README.md
RENAMED
|
File without changes
|
/package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/index.tsx
RENAMED
|
File without changes
|
/package/src/template/neo-custom-cmp-template/src/components/{entity-form → entityForm}/style.scss
RENAMED
|
File without changes
|
/package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/README.md
RENAMED
|
File without changes
|
/package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/index.tsx
RENAMED
|
File without changes
|
/package/src/template/neo-custom-cmp-template/src/components/{entity-table → entityTable}/style.scss
RENAMED
|
File without changes
|
/package/src/template/react-custom-cmp-template/src/components/{info-card → infoCard}/index.jsx
RENAMED
|
File without changes
|
/package/src/template/react-custom-cmp-template/src/components/{info-card → infoCard}/style.scss
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|