Skip to content
/ pluginwp Public template

WordPress plugin boilerplate using React and Block Editor components.

License

Notifications You must be signed in to change notification settings

jrtashjian/pluginwp

Repository files navigation

Build and Test

PluginWP Foundation

🚧 UNDER DEVELOPMENT 🚧

This code serves as a starting point for building a WordPress plugin using React and the block editor components. I also wanted to build WordPress plugins in a more modern PHP way by introducing a portion of the Service Container and Service Providers that are used in the Laravel framework.

Installation

Requirements

Quick Start

Clone this repository or click Use this template on to create a new project on GitHub.

git clone https://github.com/jrtashjian/pluginwp.git yourpluginslug

Search for PluginWP Author and replace with Actual Author Name

find . -type f -not -path "./.git/*" -exec sed -i 's/PluginWP Author/Actual Author Name/g' {} +

Search for PluginWP and replace with YourPluginSlug

find . -type f -not -path "./.git/*" -exec sed -i 's/PluginWP/YourPluginSlug/g' {} +

Search for pluginwp and replace with yourpluginslug

find . -type f -not -path "./.git/*" -exec sed -i 's/pluginwp/yourpluginslug/g' {} +

Finally, rename the main plugin file pluginwp.php to yourpluginslug.php.

Setup

Install the necessary Node.js and Composer dependencies:

$ composer install
$ npm install

Available CLI commands

  • composer lint : checks all PHP files for syntax errors.
  • composer format : fixes all automatically fixable syntax errors.
  • npm run wp-env : exposes all commands available in @wordpress/env
  • npm run build : compiles all scripts and styles for distribution.
  • npm run dev : compiles all scripts and styles for development.

Now go build something!

About

WordPress plugin boilerplate using React and Block Editor components.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published