Yeoman generator for scaffolding a Grunt based WordPress Plugin & Theme dev environment
-
Generates a project structure, organized in
./src
,./test_build
and./dist
see ???.-
./src
contains the source code. -
./test_build
contains the current build of the project. May be synchronized with a local or remote WordPress installation. -
./dist
contains releases and has the same structured as the WordPress plugin/theme svn repository.
-
-
grunt
is used to automate processes and run repetitive tasks, see ???.- It may watch file changes in
./src
and performs the required tasks to update the./test_build
directory and optionally syncs it to a WordPress installation on a local or remote system.
- It may watch file changes in
-
Generates releases with readme that adheres to the WordPress plugin readme file standard, a Changelog based on Keep a Changelog and adheres to Semantic Versioning.
-
Uses
git
and creates tags and releases with description and assets automatically. -
Generated projects are ready to be used with github-updater.
-
Ready for development with ES6 and React.js.
-
Subgenerators to create Assets, Custom Post Types, Gutenberg Blocks and to add Composer Package.
This package is part of the wp-dev-env
tool set to develop WordPress Plugins and Themes.
Packages:
-
Yeoman generator to initialize the project and add new components.
-
Configures and registers the built in grunt tasks.
-
The
php
frame. Contains base classes and utilities.
We assume you have pre-installed node.js and npm.js
yo
tested version4.3.0
Yeomancomposer
tested version2.1.8
git
tested version2.7.4
grunt
tested version1.4.1
andgrunt-cli
rsync
tested version3.1.2
gettext
tested version0.19.8.1
convert
from ImageMagick. Tested with ImageMagick6.8.9-9
All dependencies must be accessible from cli via their respective command. To test this, run something like: composer --version
or which composer
...
First, install Yeoman and generator-wp-dev-env using npm
# First, install Yeoman globally
npm install -g yo
# Install `generator-wp-dev-env` globally from github repository
npm install -g git+ssh://git@github.com/croox/generator-wp-dev-env
# To generate a new plugin or theme, create a new directory
mkdir -p ~/path/to/myproject
# Make it your working directory
cd ~/path/to/myproject
# (recommended) Set up remote origin, so the upstream can be set during project generation.
# Run the generator and follow the prompts to create a new theme/plugin
yo wp-dev-env
# Run the generator again to create new custom-post-types, scripts, styles, blocks ...
yo wp-dev-env
# List available grunt tasks
grunt
Available as docset:
Each directory of a generated project contains a readme.md
. The documentation is partly generated from those files.
To browse the docset documentation use Zeal for Linux and Windows or Dash for macOS or iOS.
Alternatively browse the docset html source on GitHub directly or preview the html source.
GPL-3.0 croox