.option('-b, --basePath <base-path>', '修改基础路径 (不要以 / 开头)')
.action((filePath, opts) => {
filePath = filePath.endsWith(VUE_SUFFIX) ? filePath : `${filePath}${VUE_SUFFIX}`
const basePath = opts.basePath || 'src/pages'
const newPagePath = path.join(basePath, filePath)
log(
infoLog(
boxen(`即将配置 ${newPagePath}`, {
padding: 1,
margin: 1,
borderStyle: 'round'
})
)
)
generating(newPagePath, filePath)
})
program.parse(process.argv)
if (!process.argv.slice(2)[0]) {
program.help()
}
发布 npm
开发完成后,发布到 npm,具体方法就不细说了,发布后全局安装就能愉快的使用咯!









