Skip to content

Yeoman generator for scaffolding Grunt based WordPress Plugins/Themes/Childthemes development environment

License

Notifications You must be signed in to change notification settings

croox/generator-wp-dev-env

Repository files navigation

generator-wp-dev-env NPM version Build Status Dependency Status

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.
  • 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:

Dependencies

We assume you have pre-installed node.js and npm.js

  • yo tested version 4.3.0 Yeoman
  • composer tested version 2.1.8
  • git tested version 2.7.4
  • grunt tested version 1.4.1 and grunt-cli
  • rsync tested version 3.1.2
  • gettext tested version 0.19.8.1
  • convert from ImageMagick. Tested with ImageMagick 6.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 ...

Installation

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

Usage

# 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

Documentation

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.

License

GPL-3.0 croox

About

Yeoman generator for scaffolding Grunt based WordPress Plugins/Themes/Childthemes development environment

Resources

License

Stars

Watchers

Forks

Packages

No packages published