croox / generator-wp-dev-env

Yeoman generator for scaffolding Grunt based WordPress Plugins/Themes/Childthemes development environment
Other
3 stars 0 forks source link

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

Yeoman generator for scaffolding a Grunt based WordPress Plugin & Theme dev environment

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

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