Day 1 of my WordPress Developer Advent Calendar.
To say developers are lazy is an understatement. We want things done for us automatically. And if something is done manually, then we write code to automate it!
Tom McFarlin’s WordPress Plugin Boilerplate is a perfect example of great work in the WordPress community at the moment. I love the project, because you can get a new plugin off the ground in a matter of minutes.
Contribute to the project on Github if you can. Even if you don’t want to contribute code, then just comment and have your say or opinion.
- Install grunt-init:
npm install -g grunt-init
- Clone the latest grunt-wp-boilerplate template from github:
git clone email@example.com:fooplugins/grunt-wp-boilerplate.git ~/.grunt-init/wp-boilerplate
- Create a new directory in your wp-content/plugins directory
- Change to the new empty directory
- Run the grunt-init template:
- Follow the prompts, and it will generate your new plugin, including renaming all the files correctly and replacing all the necessary variables within the files.