Yeoman generator for scaffolding a Grunt based WordPress Plugin & Theme dev environment
-
Generates a project structure, organized in
./src,./test_buildand./distsee ???.-
./srccontains the source code. -
./test_buildcontains the current build of the project. May be synchronized with a local or remote WordPress installation. -
./distcontains releases and has the same structured as the WordPress plugin/theme svn repository.
-
-
gruntis used to automate processes and run repetitive tasks, see ???.- It may watch file changes in
./srcand performs the required tasks to update the./test_builddirectory 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
gitand 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
phpframe. Contains base classes and utilities.
We assume you have pre-installed node.js and npm.js
yotested version4.3.0Yeomancomposertested version2.1.8gittested version2.7.4grunttested version1.4.1andgrunt-clirsynctested version3.1.2gettexttested version0.19.8.1convertfrom 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
gruntAvailable 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