grunt-install-init

Install a grunt init template

Usage no npm install needed!

<script type="module">
  import gruntInstallInit from 'https://cdn.skypack.dev/grunt-install-init';
</script>

README

grunt-install-init

Install a grunt init template

Getting Started

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');

Documentation

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.

Contributing

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.

License

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