zawntech/wpgen

There is no license information available for the latest version (1.0.1) of this package.

A WordPress plugin generator and scaffolding tool

1.0.1 2022-10-10 13:38 UTC

This package is auto-updated.

Last update: 2024-04-10 18:05:21 UTC


README

Requirements

Installation

Windows

  1. Clone the repo
  2. Run 'composer install' in the repo root directory
  3. Add the repo directory to your system's PATH

Mac

Ensure composer is installed via:

brew install composer

Clone the repo, run composer install, and chmod the wpgen file so that it is executable.

git clone git@github.org:zawntech/wpgen.git
cd wpgen
composer install
chmod 755 wpgen

Create an alias for the wpgen executable by editing or creating ~/.bashrc and adding the following:

alias wpgen='/absolute/path/to/wpgen/wpgen' 

Then restart your terminal and run wpgen to verify successful installation.

Create Plugin

In order to use wpgen, first create a plugin.

Navigate to your WordPress plugins directory, then run:

wpgen create:plugin

This creates a basic plugin architecture with a namespace of your choice.

A wpgen.config.json file is created in the plugin root directory. This file is required for all component functionality. Do not delete it.

Once your base plugin is generated, go to the new plugin directory and run:

composer install

Then, run wpgen to get a list of commands.

** create: prefixed commands must run from the plugin root directory.

** component: prefixed commands must be run from the specific component directory.