Skip to content

Commit

Permalink
chore: config script modify
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Mar 15, 2021
1 parent afdfb14 commit 69f2662
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions jd/generate-nutui.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ let importStr = `import { App } from 'vue';\n`;
const packages = [];
config.nav.map(item => {
item.packages.forEach(element => {
let { name, show } = element;
let { name, show, type } = element;
if (show) {
importStr += `import ${name} from './packages/${name.toLowerCase()}/index.vue';\n`;
importStr += `import ${name} from './packages/${name.toLowerCase()}/index${
type === 'methods' ? '' : '.vue'
}';\n`;
packages.push(name);
}
});
Expand Down
1 change: 0 additions & 1 deletion jd/generate-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fs.writeFile(
fileStr,
'utf8',
error => {
console.log(error);
// logger.success(`${package_config_path} 文件写入成功`);
}
);
Expand Down
6 changes: 3 additions & 3 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"name": "Toast",
"sort": "1",
"cName": "吐司",
"type": "component",
"type": "methods",
"show": true,
"desc": "轻提示",
"author": "undo"
Expand All @@ -160,7 +160,7 @@
"version": "3.0.0",
"name": "Notify",
"type": "component",
"cName": "消息提示",
"cName": "methods",
"desc": "在页面顶部展示消息提示,支持函数调用和组件调用两种方式",
"sort": 4,
"show": true,
Expand Down Expand Up @@ -275,7 +275,7 @@
},
{
"name": "Dialog",
"type": "component",
"type": "methods",
"cName": "对话框",
"desc": "模态对话框,在浮层中显示,引导用户进行相关操作,支持图片对话框。",
"sort": 8,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"jsx": "preserve",
"sourceMap": false,
"declaration": false,
"removeComments":true,
"removeComments": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
Expand Down

0 comments on commit 69f2662

Please sign in to comment.