"Just Do It" is designed to provide the basic requirements to help you run tasks automatically for you to save time out of your day running tests, version checking and building a deployable plugin.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
Gruntfile.js
README.md
package.json

README.md

Just Do It

A Gruntfile.js and package.json template ready to copy into your WordPress plugin projects. Just configure the package.json file to your requirements and run the Grunt commands below after installing the dependencies.

Developer Dependancies

These are the dependencies in use for testing, building, updating the language POT file and building a deployable plugin zipped up.

Installation

  1. Install Node.js & NPM and Grunt by following the standard installation instructions or using Homebrew.

If you've installed NPM correctly, this should display the version:

$ npm --version

If you've install Grunt correctly, this should display the version:

$ grunt --version

  1. Change to the plugin root directory.

Install the Grunt dependencies by running the npm installer with the following command:

$ npm install --dev or $ npm install --only=dev

  1. Run tests.

$ grunt test

Add --force at the end to tell grunt to continue next tasks even if one fails.

$ grunt test --force

Grunt Commands

Build the plugin.

String Replacements (i.e. Plugin Version), Compresses the JavaScript, Checks for Text Domain issues and Updates the POT file.

$ grunt build

Similar to the build command except it does not check for text domains issues.

$ grunt dev

Checks for any text domain issues and updates the POT file.

$ grunt update-pot

Copies the plugin to create deployable plugin, then compresses the folder and then deletes the folder once compressed.

The zip file will be labelled as %= pkg.name %-v%= pkg.version %.zip

$ grunt zip

Support Sébastien's Open Source Projects!

If you'd like me to keep producing free and open source software or if you use this script and find it useful then please consider paying for an hour of my time. I'll spend two hours on open source for each contribution.

You can find more of my Free and Open Source scripts on GitHub