redpandaventures / generator-plugin-scaffold

Yeoman generator for a PSR-4 WordPress Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

generator-plugin-scaffold

This

Yeoman generator for PSR-4 WordPress plugins. This is based off the webdevstudios generator

Getting Started

Pre-requisites: You'll need node which comes with npm.

If you don't have Yeoman installed:

npm install -g yo

To install generator-plugin-scaffold from npm, run: (not published yet)

npm install -g generator-plugin-scaffold

To install generator-plugin-scaffold from git, run:

npm install -g git+https://github.com/redpandaventures/generator-plugin-scaffold

To use generator-plugin-scaffold, cd to your WordPress plugins folder and:

yo plugin-scaffold

You'll be prompted with steps for creating your plugin.

Tests

By default the plugin generator includes some built in tests for you to add on to as you develop your plugin. Theses

To run these tests run the install-wp-tests.sh script in the bin folder with the proper database details for your local setup.

Once you've run the install-wp-tests.sh script you can run just phpunit in the main folder of your plugin.

If you don't want tests included in your plugin when it is generated run the main generator with the --notests option.

PHP 7.2

By default PHP 7.2 is is the minimum version supported for this generator.

About

Yeoman generator for a PSR-4 WordPress Plugin

License:GNU General Public License v3.0


Languages

Language:JavaScript 56.9%Language:PHP 25.8%Language:Shell 16.2%Language:CSS 1.1%