Generator-wp is a Yeoman generator for generating a base WordPress plugin (with themes to come) or a test environment for WordPress itself for use on UF Health WordPress properties based, in part, on generator-wp-make by 10up.
If you need it, install Yeoman through npm:
$ npm install -g yo
To install generator-wp clone this repository, enter the directory, and link it to npm:
$ git clone [email protected]:WebServices/generator-wp.git && cd generator-wp
$ npm install
$ npm link
Finally, in the desired project directory (where your plugin or theme will go), initiate the generator:
$ yo wp
generator-wp currently ships with te default project type, it is invoked with a subgenerator.
For each project type you get:
- Composer to manage server-side dependencies
- NPM to manage development dependencies (like Grunt)
- Grunt to streamline JS and CSS assets
- phpunit for PHP unit testing
- A fully-fleshed out, name-spaced setup for WordPress plugin development
- A Docker configuration, compatible with Ouroboros, to get you actually working on code quickly.
This subgenerator scaffolds out a standard WordPress plugin.
The project even includes some basic unit test examples to help get you started!
$ cd [my-plugin-dir]
$ yo wp:plugin
For information on developing and using a generated plugin see the README.md file within after generating.
This subgenerator sets up a quick WordPress environment for testing or other use.
$ cd [the directory where you want to install WordPress]
$ yo wp:core
After installation is complete bring up the local environment in Docker with the Develop script and run ./Docker/bin/setup
. WordPress will then be accessible at http://wordpress.test
More project types coming soon
- Setup the appropriate domain for debugging with wp-cli
- Use appropriate user for XDebug scripts
- Add scripts to enable and disable full-time listening for XDebug
- Updated export to work in Linux as well as Mac
- Fix .htaccess for multisite with a new apache image
- Make sure WordPress' rewrite rules are in place
- Added the wp:core command to install a quick test environment.
- Allow plugin setup without CSS or JS support
- Add Ouroboros-compatible Docker configuration to setup
- Allow UF Health prefix to be optional on setup
- Better handle plugin name, slug and other variables throughout the templates
- Add code coverage information
- Cleanup of existing templates
- Auto-initialize GIT repository
- Enable wp-enforcer
- Fix wp-enforcer
- Drop WordPress VIP standards
- Minor name fixes
- Don't use grunt/phpunt
- Remove WP_Mock and use standard WordPress coding standards
- Ensure NPM packages are always up to date
- install composer an npm modules on use
- run grunt on initial setup
- Update default packages in package.json
- Defined the path to the includes folder in the main plugin file.
- Updated PHPUnit to 6.5.* to address updates to wp_mock.
- Fixed languages information in plugin index file
- Update default URLs and author to be more inline with UF Health Webservices
- Updated generated package.json for more current packages
- Update yeoman and related JS dependencies
- Updated prompt descriptions for better clarity.
- Add Grunt clean to plugin grunt processes
- Add dev and prod versions of compiled JS with appropriate mappings
- Cleanup package versions in package.json
- Ignore vendor folder in .pot generation
- Added Full GIT repository address to generated plugin.
- Added usage and build instructions to the readme.md file of generated plugins.
- Add unit to plugin display name for easier sorting in WordPress dashboard
- Replace Travis template with GitLab CI template
- Fix: Make sure source assets are not caught up in .gitignore.
- Initial release