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
~/.grunt-init/ directory. It's recommended that you use git to clone this template into that directory, as follows:
git clone firstname.lastname@example.org:fooplugins/grunt-wp-boilerplate.git ~/.grunt-init/wp-boilerplate
git clone email@example.com:fooplugins/grunt-wp-boilerplate.git %USERPROFILE%/.grunt-init/wp-boilerplate
- At the command-line, create a new directory in wp-content/plugins
- cd into an empty directory
- run the following command and follow the prompts
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.
Most of this is copied from grunt-wp-plugin by 10up, so thanks to them!