Skip to content

Commit e525e7c

Browse files
author
Justin Vogt
committed
Update docs to add bundling section and clarify configuration steps
1 parent 92981c1 commit e525e7c

5 files changed

Lines changed: 16 additions & 20 deletions

File tree

.opencode/command/commands-upsert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description: Sync commands and skills from boilerplate
44

55
Use the `boilerplate-update` skill to sync `.opencode/command/` and `.opencode/skill/` from upstream.
66

7-
Focus only on section "9. .opencode/ Configuration".
7+
Focus only on section "8. .opencode/ Configuration".

.opencode/command/rules-upsert.md

Whitespace-only changes.

.opencode/command/strauss-upsert.md

Whitespace-only changes.

.opencode/skill/boilerplate-update/SKILL.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ The boilerplate includes detailed docs at `tmp/boilerplate-ref/docs/`:
4848
| File | Covers |
4949
|------|--------|
5050
| `abilities.md` | Abilities API interfaces, category/ability creation, Loader registration |
51+
| `bundeling.md` | wp-scripts bundling, entry points, asset enqueueing, localization |
5152
| `i18n.md` | Translation workflow, extract/compile scripts, JSON translations, caveats |
5253
| `create-blocks.md` | Block scaffolding, auto-registration via manifest, editor style sharing |
5354
| `wp-env.md` | Docker-based dev environment, script structure, CI/CD usage |
@@ -68,9 +69,11 @@ Compare: `diff composer.json tmp/boilerplate-ref/composer.json`
6869

6970
**QA config files:** `tmp/boilerplate-ref/phpcs.xml`, `tmp/boilerplate-ref/phpstan.neon`
7071

71-
### 2. JS (package.json & QA)
72+
### 2. JS & Bundling (package.json, webpack.config.js)
7273

73-
Compare: `diff package.json tmp/boilerplate-ref/package.json`
74+
Compare:
75+
- `diff package.json tmp/boilerplate-ref/package.json`
76+
- `diff webpack.config.js tmp/boilerplate-ref/webpack.config.js`
7477

7578
**New primitives:**
7679
- `@wordpress/scripts` - Replaces other bundlers (webpack, bud.js, laravel-mix)
@@ -79,24 +82,18 @@ Compare: `diff package.json tmp/boilerplate-ref/package.json`
7982

8083
**QA config files:** `tmp/boilerplate-ref/.eslintrc`
8184

85+
See `tmp/boilerplate-ref/docs/bundeling.md` for entry points, asset enqueueing, and localization.
8286
See `tmp/boilerplate-ref/docs/wp-env.md` for wp-env details.
8387

84-
### 3. webpack.config.js
85-
86-
Compare: `diff webpack.config.js tmp/boilerplate-ref/webpack.config.js`
87-
88-
Extends `@wordpress/scripts/config/webpack.config` with custom entry points.
89-
Entry structure: `resources/{admin,frontend}/{js,scss}/app.{js,scss}`
90-
91-
### 4. GitHub Actions (.github/workflows/)
88+
### 3. GitHub Actions (.github/workflows/)
9289

9390
Compare: `diff -r .github/workflows tmp/boilerplate-ref/.github/workflows`
9491

9592
- `setup.yml` - Reusable workflow with dependency caching
9693
- `test-analyse.yml` - PHPStan, PHPCS, JS linting on push
9794
- `deploy.yml` - Release automation, translation compilation via wp-env
9895

99-
### 5. Loader.php
96+
### 4. Loader.php
10097

10198
Compare: `diff src/Loader.php tmp/boilerplate-ref/src/Loader.php`
10299

@@ -105,30 +102,28 @@ Compare: `diff src/Loader.php tmp/boilerplate-ref/src/Loader.php`
105102
- `add_cli($name, $instance, $args)`
106103
- `add_ability($ability_class)` - Categories auto-register
107104

108-
### 6. Main Plugin Class
105+
### 5. Main Plugin Class
109106

110107
Compare: `diff src/*.php tmp/boilerplate-ref/src/Demo_Plugin.php`
111108

112109
**New patterns:**
113-
- `enqueue_entrypoint($entry)` - Asset loading with `.asset.php` metadata
114-
- `register_blocks()` - Uses `wp_register_block_types_from_metadata_collection()` (WP 6.8+)
115-
116-
See `tmp/boilerplate-ref/docs/create-blocks.md` for block handling details.
110+
- `enqueue_entrypoint($entry)` - See `tmp/boilerplate-ref/docs/bundeling.md`
111+
- `register_blocks()` - See `tmp/boilerplate-ref/docs/create-blocks.md`
117112

118-
### 7. i18n Workflow
113+
### 6. i18n Workflow
119114

120115
Scripts: `i18n:extract` (creates .pot, updates .po) and `i18n:compile` (generates .mo, .json, .php)
121116

122117
See `tmp/boilerplate-ref/docs/i18n.md` for workflow, caveats, and AI command.
123118

124-
### 8. Abilities API (WordPress 6.9+)
119+
### 7. Abilities API (WordPress 6.9+)
125120

126121
Exposes plugin functionality via structured interface with input/output schemas.
127122
Registration: `$this->loader->add_ability(Abilities\My_Ability::class)`
128123

129124
See `tmp/boilerplate-ref/docs/abilities.md` for interface reference and examples.
130125

131-
### 9. .opencode/ Configuration
126+
### 8. .opencode/ Configuration
132127

133128
Compare: `diff -r .opencode tmp/boilerplate-ref/.opencode`
134129

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Detailed guides are available in `docs/`:
99
| File | Covers |
1010
|------|--------|
1111
| `abilities.md` | Abilities API: interfaces, category/ability creation, Loader registration |
12+
| `bundeling.md` | wp-scripts bundling, entry points, asset enqueueing, localization |
1213
| `i18n.md` | Translation workflow, extract/compile scripts, JSON translations |
1314
| `create-blocks.md` | Block scaffolding, auto-registration, editor style sharing |
1415
| `wp-env.md` | Docker dev environment, script structure, CI/CD usage |

0 commit comments

Comments
 (0)