https://github.com/syntatis/howdy
👋 Build your next modern plugin for WordPress®
https://github.com/syntatis/howdy
autoloader composer composer-project php-scoper phpcs wordpress wordpress-plugin-boilerplate wp-scripts
Last synced: about 1 month ago
JSON representation
👋 Build your next modern plugin for WordPress®
- Host: GitHub
- URL: https://github.com/syntatis/howdy
- Owner: syntatis
- License: gpl-3.0
- Created: 2024-09-19T01:12:40.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T11:58:25.000Z (3 months ago)
- Last Synced: 2025-03-31T05:32:45.636Z (about 1 month ago)
- Topics: autoloader, composer, composer-project, php-scoper, phpcs, wordpress, wordpress-plugin-boilerplate, wp-scripts
- Language: PHP
- Homepage:
- Size: 399 KB
- Stars: 37
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đź‘‹ Howdy
**Howdy** is a starter kit for creating WordPress plugins. It provides a boilerplate structure with pre-configured tools to help you start developing plugins using modern PHP practices like [PSR-4 Autoloading](https://www.php-fig.org/psr/psr-4/) with [Composer](https://getcomposer.org), [PHP Code Sniffer (PHPCS)](https://github.com/PHPCSStandards/PHP_CodeSniffer), and Dependency Injection (DI) Containers—without the hassle of setting everything up from scratch.
## Requirements
- PHP 7.4 or higher
- Node.js 20 or higher
- [Composer](https://getcomposer.org)## Usage
To start a new plugin project, simply run:
```bash
composer create-project syntatis/howdy
```This command will set up the boilerplate files in a directory named `howdy`. It will ask you a few questions to customize your project, like the plugin slug, name, and the PHP namespaces.
Once you've input all these details, it will scope the plugin dependency libraries to prevent naming conflicts with other plugins which may also be using the same libraries. You can find the scoped dependencies in the `dist/autoload` directory.
> [!TIP]
> Want to create the project in a different folder? Just add the directory name at the end of the command, like this:
> ```bash
> composer create-project syntatis/howdy awesome-plugin
> ```
> This will create the project in the `awesome-plugin` directory.
> For more details, check out the [Composer CLI documentation](https://getcomposer.org/doc/03-cli.md#create-project).After the project setup is complete, run the following command within your plugin directory to start compiling the assets, like the stylesheets and the JavaScript files. It will also watch for the changes within the files and recompile them automatically.
```bash
npm install
npm run start
```## Commands
Commands are available to help you with the development process. You can run these commands from the root of your plugin directory.
Command
Description
composer scoper
Scopes the plugin Composer dependencies to prevent namespace conflicts with other plugins.
composer build
Run the plugin build process for production i.e. updating the translation POT file, and prefixing namespace.
composer plugin:zip
Creates a zip file of the plugin for distribution. Based on the Composerarchive
. Refer to the documentation for the available options to run the command.
npm run start
Compiles the assets, like the stylesheets and the JavaScript files, and watches for the changes within the files to recompile them automatically.
npm run build
Builds the assets for production. It compiles the assets, like the stylesheets and the JavaScript files, and minifies them for production use.
## Plugins
List of plugins built with Howdy:
- 🚦 [Feature Flipper](https://wordpress.org/plugins/syntatis-feature-flipper/): Disable Comments, Gutenberg, Emojis, and other features you don't need in WordPress®.
## References
- [WordPress Plugin Handbook](https://developer.wordpress.org/plugins/) for plugin guidelines.
- [WordPress Plugin Boilerplate](https://github.com/DevinVinson/WordPress-Plugin-Boilerplate) for inspiration.