-
Notifications
You must be signed in to change notification settings - Fork 9
4 Contributing
James Mehorter edited this page Jun 6, 2015
·
7 revisions
After cloning this repository into your wp-content/plugins/ directory you can immediately activate it and begin using the plugin. However, if you wish to contribute to the development of this plugin you'll also need to do the following.
Running Grunt - We use Grunt tasks to compile Sass and JavaScript, generate the i18n *.pot file, and if present; create *.mo files for each *.po translation file.
- Navigate to the plugin directory within your shell
- Download node modules for Grunt:
npm install
- Run
grunt
to process each task, orgrunt watch
to compile when changes are noticed
Running Unit Tests - We use phpunit tests to verify our code is quality assured. You can build and/or run the tests locally by doing the following.
- Install temporary WP for testing - Follow step 3 here https://github.com/wp-cli/wp-cli/wiki/Plugin-Unit-Tests (we've already done steps 1 and 2 for you :))
// VVV Example
$ cd /srv/www/wordpress-default/wp-content/plugins/device-theme-switcher
$ bash bin/install-wp-tests.sh wordpress_test root root localhost latest
- Install phpunit
- Then you can run
phpunit
to run the tests