grunt-init template to create a project that has Node package and optionally Bower, Component, Jam and/or UMD package. Includes jshint, mocha+chai tests, jsdoc (optionally).
Want to see pretty graphs? Log in now!
npm install grunt-init-pack
|13||downloads in the last month|
|Last Published By|
|Version||0.0.5 last updated a month ago|
|Keywords||gruntplugin, grunt-init, template, bower, component, jam, umd, package, jshint, mocha, chai, jsdoc|
If you haven't already done so, install grunt-init.
npm install -g grunt-init
Once grunt-init is installed, place this template in your
It's recommended that you use
git clone to install this template into that directory as follows:
git clone https://github.com/gamtiq/grunt-init-pack.git ~/.grunt-init/pack
(Windows users should use %USERPROFILE%\.grunt-init\pack as the correct destination directory path)
grunt-init to use custom default values, move the
defaults.json file to your
and customize the values in that file.
Note: you can make the template available as any name you choose by simply changing the name of the folder
that the template is installed into. So instead of
~/.grunt-init/pack, you may change the name to
so that the template can be used with the following command:
Also you can clone the template into any subdirectory outside of
~/.grunt-init/ directory. For example:
git clone https://github.com/gamtiq/grunt-init-pack.git path/to/grunt-init/templates/pack
In this case you will have to specify path to the template when running
grunt-init (see below).
At the command-line, cd into an empty directory, run this command and follow the prompts.
when the template was placed in subdirectory outside of
Note that this template will generate files in the current directory, so be sure to change to a new directory first if you don't want to overwrite existing files.
You might want to test that it works before you begin customizing the project:
npm installto install the project's dependencies; it is necessary only if you have answered
noto the corresponding question
grunt allto build the project and test that it works
Redefining default prompt answers
You can redefine default prompt answers using
(see here for details).
Below supported prompt names are listed:
name- project name
description- project description
keywords- project keywords
version- initial version
repository- project repository
homepage- URL of project home page
bugs- URL of project issues tracker
licenses- project licenses
author_name- author name
author_email- author email
author_url- URL of author's site
node_version- minimal Node.js version
main- main file
cli- whether project should have command-line interface
npm_test- NPM test command
bower- whether project should have Bower package
component- whether project should have Component package
jam- whether project should have Jam package
umd- whether project should have AMD package or standalone script file
jsdoc- whether project should use JSDoc
travis- whether support for Travis CI should be added
travis_badge- whether Travis CI build status badge should be included into
npm_badge- whether NPM version badge should be included into
grunt_badge- whether Grunt badge should be included into
history_md- to include or not
History.mdin the project files
release_task- to include or not release tasks into Gruntfile
npm_install- to run or not
npm installcommand automatically