@iservice-dev/is-wp-plugin-kit
v1.11.10
Published
A toolkit for WordPress plugin development with Vite, TypeScript, and modern build tools
Readme
@iservice-dev/is-wp-plugin-kit
A toolkit for WordPress plugin development with Vite, TypeScript, and modern build tools. Internal iService tooling — plugins scaffolded with it use the IS\ namespace and depend on the IS Base Plugin at runtime.
Quick Start
1. Initialize a New Plugin
npx @iservice-dev/is-wp-plugin-kit initThis sets up your complete plugin structure with:
- Configuration files (
.gitignore, TypeScript, linting, PostCSS) - Folder structure (
assets/,includes/,languages/) - Template files (
Config.php,Plugin.php,de_DE.po) vite.config.tswith default settings
2. Install Dependencies
npm install3. Start Development
npm run devOptional: Add a Divi 5 module
npx @iservice-dev/is-wp-plugin-kit add-divi5Scaffolds a self-contained divi5/ workspace (own webpack build) with a working
example module. Namespace and slug are auto-detected. From then on npm run build
and npm run dev in the plugin root build/watch divi5/ too (installing its deps
on first run) — no separate cd divi5 step needed. The IS Base plugin auto-loads
it — no wiring needed.
Configuration
Port Settings
If you need a different port for general development, update both:
vite.config.ts:
export default wpPluginKitVite({
port: 5500 // Change this
});includes/lib/Core/Config.php:
$this->vitePort = 5500; // Change thisPHP Customization
All customization points in the PHP template files are marked with TODO comments. Check:
includes/lib/Core/Plugin.phpincludes/lib/Core/Config.php
Available Commands
npm run dev # Development mode with watchers
npm run build # Production buildKit CLI (via npx @iservice-dev/is-wp-plugin-kit <command>):
init # Scaffold a new plugin
add-divi5 # Add a Divi 5 module bundle (divi5/)
compile-mo # Convert .po → .moWhat's Included
- Vite: Fast development server with HMR
- TypeScript: Full type support for WordPress development
- SCSS: Modern CSS workflow with PostCSS and Autoprefixer
- Linting: OXLint for JS/TS, Stylelint for CSS/SCSS
- i18n: Automatic
.poto.mocompilation - File Watchers: Auto-lint and compile on file changes
- Divi 5 (optional): An auto-detected
divi5/module workspace (own webpack build) is built bynpm run build, watched bynpm run dev, and packaged into the release zip. Plugins without adivi5/folder are unaffected.
Project Structure
your-plugin/
├── assets/
│ ├── src/
│ │ ├── ts/ # TypeScript files
│ │ ├── scss/ # SCSS files
│ │ ├── images/ # Images
│ │ ├── fonts/ # Fonts
│ │ ├── l10n/ # Translation files (.po)
│ │ └── legacy/ # Legacy JS/CSS
│ └── dist/ # Built files (auto-generated)
├── includes/
│ └── lib/
│ ├── Core/ # Plugin core classes
│ ├── Admin/ # Admin classes
│ └── Frontend/ # Frontend classes
├── languages/ # Compiled .mo files
└── vite.config.tsRequirements
- Node.js 18 or higher
- Vite 7.x
- IS Base Plugin — installed and active in WordPress. Plugins generated by this kit deactivate themselves if it is missing (they rely on its autoloader, updater, and requirement checks).
License
ISC
