Skip to content

Commit 714cfe2

Browse files
author
qhdhiman
committed
优化add命令提示语
1 parent ced45f7 commit 714cfe2

File tree

2 files changed

+483
-3
lines changed

2 files changed

+483
-3
lines changed

commands/add.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const resolve = require('resolve')
77
const chalk = require('chalk')
88
const copy = require('copy')
99
const baseDir = resolve.sync('vue-cli-plugin-multi-page', { basedir: process.cwd() })
10-
const source = path.resolve(path.dirname(baseDir), 'generator/template/ejs/**')
10+
const source = path.resolve(path.dirname(baseDir), 'generator/template/m/**')
1111
const dist = 'src/modules/'
1212

1313
module.exports = (api, options) => {
@@ -26,6 +26,8 @@ module.exports = (api, options) => {
2626
// `files` is an array of the files that were copied
2727
console.log(chalk.yellow(`模块${entry}创建成功!`))
2828
});
29+
} else {
30+
console.log(chalk.red(`npm run add [module] 缺失参数: module`))
2931
}
3032
})
3133
}

0 commit comments

Comments
 (0)