Skip to content

Commit 122216b

Browse files
committed
增加自定义指令
1 parent f76ff61 commit 122216b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

generator/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ module.exports = (api, option, rootOptions) => {
1414
"extends": [
1515
"plugin:react/recommended",
1616
]
17-
}
17+
},
18+
scripts: {
19+
"vueconf": "vue-cli-service vueconf"
20+
},
1821
});
1922
// 渲染模板
2023
api.render('./template', {

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,16 @@ module.exports = (api, projectOptions) => {
66
.add('./src/index.js')
77
.end();
88
});
9+
10+
api.registerCommand(
11+
'vueconf', {
12+
description: 'test',
13+
usage: 'vue-cli-service vueconf',
14+
options: {}
15+
},
16+
(args) => {
17+
console.log('测试输出projectOptions(包含pluginOptions)');
18+
console.log(projectOptions);
19+
}
20+
);
921
};

0 commit comments

Comments
 (0)