Grunt-init是一个用来自动创建项目的架构工具,它会建立一个完整的目录结构和一个基本的配置环境,当然具体文件和内容取决于所选择的模板
安装grunt-init
使用
npm install -g grunt-init
-g 会添加grunt-init到环境变量,允许在任何地方运行grunt-init命令
获取帮助
grunt-init --help
以下是输出
grunt-init: Generate project scaffolding from a template. (v0.3.2)
Usage
grunt-init [options] [template]
Options
--help, -h Display this help text.
--no-color Disable colored output.
--debug, -d Enable debugging mode for tasks that support it.
--stack Print a stack trace when exiting with a warning or fatal error.
--force, -f A way to force your way past warnings. Want a suggestion? Don't
use this option, fix your code.
--no-write Disable writing files (dry run).
--verbose, -v Verbose mode. A lot more information output.
--version, -V Print the grunt version. Combine with --verbose for more info.
Available templates
(No templates found)
Templates that exist in the C:\Users\t\.grunt-init directory may be run with
"grunt-init TEMPLATE". Templates that exist in another location may be run with
"grunt-init /path/to/TEMPLATE". A template is a directory that must contain, at
the very minimum, a template.js file.
For more information, see http://gruntjs.com/project-scaffolding
从输出可用看出没有可用的模板
几个Grunt-init维护的模板