@iservice-dev/is-wp-plugin-kit 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +58 -72
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,113 +2,99 @@
2
2
 
3
3
  A toolkit for WordPress plugin development with Vite, TypeScript, and modern build tools.
4
4
 
5
- ## Features
5
+ ## Quick Start
6
6
 
7
- - 🚀 **Vite Integration**: Fast development with HMR support
8
- - 📦 **TypeScript Support**: Full TypeScript configuration for WordPress plugins
9
- - 🎨 **SCSS Processing**: Modern CSS workflow with PostCSS and Autoprefixer
10
- - 🔍 **Linting**: Pre-configured OXLint and Stylelint rules
11
- - 🌍 **i18n Support**: Compile `.po` files to `.mo` for WordPress localization
12
- - 📁 **Smart Asset Handling**: Automatic processing of JS, CSS, images, and fonts
13
-
14
- ## Installation
7
+ ### 1. Initialize a New Plugin
15
8
 
16
9
  ```bash
17
- npm install --save-dev @iservice-dev/is-wp-plugin-kit
10
+ npx @iservice-dev/is-wp-plugin-kit init
18
11
  ```
19
12
 
20
- ## Usage
21
-
22
- ### Initialize Your Project
13
+ This sets up your complete plugin structure with:
14
+ - Configuration files (`.gitignore`, TypeScript, linting, PostCSS)
15
+ - Folder structure (`assets/`, `includes/`, `languages/`)
16
+ - Template files (`Config.php`, `Plugin.php`, `de_DE.po`)
17
+ - `vite.config.ts` with default settings
23
18
 
24
- Set up your WordPress plugin with default configuration files:
19
+ ### 2. Install Dependencies
25
20
 
26
21
  ```bash
27
- npx is-wp-plugin-kit init
22
+ npm install
28
23
  ```
29
24
 
30
- This creates the following files in your project root:
31
- - `.gitignore` - WordPress-specific ignore patterns
32
- - `oxlintrc.json` - JavaScript/TypeScript linting configuration
33
- - `stylelintrc.json` - CSS/SCSS linting configuration
34
- - `postcss.config.cjs` - PostCSS configuration with Autoprefixer
35
- - `tsconfig.json` - TypeScript configuration optimized for WordPress
25
+ ### 3. Start Development
26
+
27
+ ```bash
28
+ npm run dev
29
+ ```
36
30
 
37
- ### Vite Configuration
31
+ ## Configuration
38
32
 
39
- In your `vite.config.js`:
33
+ ### Port Settings
40
34
 
41
- ```javascript
42
- import { defineConfig } from 'vite';
43
- import wpPluginKit from '@iservice-dev/is-wp-plugin-kit';
35
+ If you need a different port for general development, update both:
44
36
 
45
- export default defineConfig({
46
- plugins: [
47
- wpPluginKit({
48
- entry: 'src/main.ts', // Your main entry file
49
- outDir: 'dist', // Output directory
50
- })
51
- ]
37
+ **`vite.config.ts`:**
38
+ ```typescript
39
+ export default wpPluginKitVite({
40
+ port: 5500 // Change this
52
41
  });
53
42
  ```
54
43
 
55
- ### Compile Translation Files
56
-
57
- Compile `.po` files to `.mo` for WordPress i18n:
58
-
59
- ```bash
60
- npx is-wp-plugin-kit compile-mo
44
+ **`includes/lib/Core/Config.php`:**
45
+ ```php
46
+ $this->vitePort = 5500; // Change this
61
47
  ```
62
48
 
63
- This automatically finds and compiles all `.po` files in your `languages/` directory.
49
+ ### PHP Customization
64
50
 
65
- ## What's Included
51
+ All customization points in the PHP template files are marked with `TODO` comments. Check:
52
+ - `includes/lib/Core/Plugin.php`
53
+ - `includes/lib/Core/Config.php`
66
54
 
67
- ### Vite Plugin
55
+ ## Available Commands
68
56
 
69
- The plugin automatically handles:
70
- - **Entry point compilation** (TypeScript/JavaScript)
71
- - **SCSS processing** with PostCSS
72
- - **Asset copying** (images, fonts, PHP files)
73
- - **WordPress-specific optimizations**
74
-
75
- ### Configuration Files
76
-
77
- #### TypeScript (`tsconfig.json`)
78
- Pre-configured for WordPress development with proper types and module resolution.
57
+ ```bash
58
+ npm run dev # Development mode with watchers
59
+ npm run build # Production build
60
+ ```
79
61
 
80
- #### PostCSS (`postcss.config.cjs`)
81
- Includes Autoprefixer for automatic vendor prefixing.
62
+ ## What's Included
82
63
 
83
- #### Linting
84
- - **OXLint**: Fast JavaScript/TypeScript linting
85
- - **Stylelint**: CSS/SCSS linting with modern standards
64
+ - **Vite**: Fast development server with HMR
65
+ - **TypeScript**: Full type support for WordPress development
66
+ - **SCSS**: Modern CSS workflow with PostCSS and Autoprefixer
67
+ - **Linting**: OXLint for JS/TS, Stylelint for CSS/SCSS
68
+ - **i18n**: Automatic `.po` to `.mo` compilation
69
+ - **File Watchers**: Auto-lint and compile on file changes
86
70
 
87
71
  ## Project Structure
88
72
 
89
- Your WordPress plugin should follow this structure:
90
-
91
73
  ```
92
74
  your-plugin/
93
- ├── src/
94
- │ ├── main.ts # Entry point
95
- │ ├── styles/ # SCSS files
96
- └── ...
97
- ├── languages/ # Translation files (.po)
98
- ├── dist/ # Built files (auto-generated)
99
- ├── vite.config.js
100
- └── package.json
75
+ ├── assets/
76
+ │ ├── src/
77
+ ├── ts/ # TypeScript files
78
+ │ ├── scss/ # SCSS files
79
+ │ │ ├── images/ # Images
80
+ │ │ ├── fonts/ # Fonts
81
+ │ │ ├── l10n/ # Translation files (.po)
82
+ │ │ └── legacy/ # Legacy JS/CSS
83
+ │ └── dist/ # Built files (auto-generated)
84
+ ├── includes/
85
+ │ └── lib/
86
+ │ ├── Core/ # Plugin core classes
87
+ │ ├── Admin/ # Admin classes
88
+ │ └── Frontend/ # Frontend classes
89
+ ├── languages/ # Compiled .mo files
90
+ └── vite.config.ts
101
91
  ```
102
92
 
103
93
  ## Requirements
104
94
 
105
95
  - Node.js 18 or higher
106
- - Vite 5.x or 6.x (peer dependency)
96
+ - Vite 7.x
107
97
 
108
98
  ## License
109
99
 
110
100
  ISC
111
-
112
- ## Repository
113
-
114
- [https://github.com/iservice-dev/is-wp-plugin-kit](https://github.com/iservice-dev/is-wp-plugin-kit)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iservice-dev/is-wp-plugin-kit",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "A toolkit for WordPress plugin development with Vite, TypeScript, and modern build tools",
5
5
  "type": "module",
6
6
  "main": "vite/index.js",