grunt-install-init

Install a grunt init template

grunt-install-init

Install a grunt init template

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-install-init

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-install-init');

grunt-install-init copies grunt init style files from a directory into the grunt's userDir (~/.grunt for Linux or %USERPROFILE% for Windows).

grunt.initConfig({
  'install-init': {
    // 'Plugin name': 'Base directory where plugin is stored' 
    'myinittemplate': 'src'
  }
});

copies src/myinittemplate.js and src/myinittemplate (a directory) into the grunt userDir's tasks/init folder.

Once they are copied, you can call grunt init:myinittemplate in a new folder and the init script you have set up will run.

More info on init can be found in the grunt documenation.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Copyright (c) 2012 Todd Wolfson Licensed under the MIT license.