diff --git a/lib/feflow.js b/lib/feflow.js index 0dd089f9..c6def63b 100644 --- a/lib/feflow.js +++ b/lib/feflow.js @@ -20,7 +20,10 @@ function entry(args) { return feflow.init().then(function() { let cmd = ''; - if (!args.h && !args.help) { + if (args.v || args.version) { + console.log(`v${feflow.version}`); + return; + } else if (!args.h && !args.help) { cmd = args._.shift(); if (cmd) { diff --git a/lib/plugins/console/help.js b/lib/plugins/console/help.js index b7dd1c46..8acf6352 100644 --- a/lib/plugins/console/help.js +++ b/lib/plugins/console/help.js @@ -6,18 +6,15 @@ function helpConsole(args) { Usage: feflow [options] [command] Commands: - init Choose a scaffold to initialize project. + init Choose a boilerplate to initialize project. install Install a plugin or a yeoman generator. - publish Publish files to cdn or offline package. - jb Publish to jb when in development. - ars --env Publish to ars code platform, env is daily, pre or prod. Options: - --version, -[vV] Print version and exit successfully. - --help, -[hH] Print this help and exit successfully. + --version, -[v] Print version and exit successfully. + --help, -[h] Print this help and exit successfully. - Report bugs to http://git.code.oa.com/feflow/discussion/issues. + Report bugs to https://github.com/iv-web/feflow-cli/issues. `); return cli.showHelp(1); diff --git a/lib/plugins/generator/generator.js b/lib/plugins/generator/generator.js index bd13a8d4..4644704e 100644 --- a/lib/plugins/generator/generator.js +++ b/lib/plugins/generator/generator.js @@ -31,7 +31,7 @@ function init(ctx) { name && run(name, ctx); }); } else { - log.warn('检测到你还未安装任何脚手架,请先安装后再进行项目初始化,参考文档:http://feflow.oa.com/docs/index.html') + log.warn('检测到你还未安装任何模板,请先安装后再进行项目初始化,参考文档:https://github.com/iv-web/feflow-cli/blob/master/README.md') } }); } diff --git a/lib/plugins/generator/index.js b/lib/plugins/generator/index.js index a8824204..33714030 100644 --- a/lib/plugins/generator/index.js +++ b/lib/plugins/generator/index.js @@ -4,5 +4,5 @@ module.exports = function(ctx) { const cmd = ctx.cmd; - cmd.register('init', 'Choose a scaffold to initialize project.', {}, require('./generator')); + cmd.register('init', 'Choose a boilerplate to initialize project.', {}, require('./generator')); }; \ No newline at end of file diff --git a/package.json b/package.json index ceb2a0d7..f5b38ec4 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "bunyan": "^1.8.12", "chalk": "^2.0.1", "co": "^4.6.0", + "easy-table": "^1.1.0", "figlet": "^1.2.0", "hexo-fs": "^0.2.1", "inquirer": "^3.0.6",