Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
/graphify-out/
/node_modules/
/scripts/
/src/
/src/blocks/
/src/css/
/src/js/
/tests/
/*.config.js
/*.config.mjs
Expand Down
1 change: 0 additions & 1 deletion docs/internal/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ None at the moment.

Keep implementation follow-ups out of documentation pull requests; record each with a reproduction and revision when it is picked up.

- **Release zip:** no `.distignore` ships, so `release:zip` includes `src/`, `docs/`, `graphify-out/`, AI files and dotfiles.
- **Scaffold wiring targets:** `wp/rest` and `wp/cli` suggest `inc/Modules/Rest.php` and `inc/Modules/Cli.php`, but this skeleton's modules are `REST.php` and `CLI.php`, which are different files on case-sensitive filesystems. Keep the uppercase names (they match WordPress acronym style and the framework's `AbstractRESTController` / `CLICommand`); the skill adapts, and CLI users edit the existing file. Fix upstream in wp-tooling.
- **Block scaffolder:** `npm run create:block` writes meta blocks to `src/blocks/meta-blocks/`, which `Assets::STATIC_BLOCKS` cannot register.
- **Dangling references:** `PluginSetup::deactivate()` mentions a root `uninstall.php` and `Util::get_data()` reads `inc/data/`; neither ships.
Expand Down
9 changes: 6 additions & 3 deletions docs/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ If your host deploys from a build step or a site repository instead, run the fir

`release:zip` packs the working tree as it is on disk and never reads `.gitignore`. That is how the built `vendor/` and `assets/build/` get in, but it also means:

- The plugin ships a `.distignore` that leaves out development files: dotfiles (including the gitignored `.env.local` and `.wp-env.override.json`), `src/`, `docs/`, `scripts/`, `tests/`, `bin/`, `graphify-out/`, build and lint configs, and the lock files.
- The plugin ships a `.distignore` that leaves out development files: dotfiles (including the gitignored `.env.local` and `.wp-env.override.json`), `src/` (except `src/components/`), `docs/`, `scripts/`, `tests/`, `bin/`, `graphify-out/`, build and lint configs, and the lock files.
- A `.distignore` replaces the built-in default list rather than extending it, and does not support `!` negation, so it must list everything to leave out. Keep it up to date when you add files that should not ship.
- Without a `.distignore`, only `.git/`, `dist/`, `tests/`, `node_modules/`, `bin/`, `.github/`, `*.config.js` and `package-lock.json` would be left out.

Expand All @@ -113,7 +113,10 @@ The shipped `.distignore`:
/graphify-out/
/node_modules/
/scripts/
/src/
# Build sources only: src/components/ ships, its PHP is loaded at runtime.
/src/blocks/
/src/css/
/src/js/
/tests/
/*.config.js
/*.config.mjs
Expand All @@ -127,7 +130,7 @@ The shipped `.distignore`:
/package-lock.json
```

It keeps the main plugin file, `inc/`, `templates/`, `languages/`, `assets/`, `vendor/`, `composer.json`, `README.md`, `CHANGELOG.md` and `LICENSE.md`. Check the result with `unzip -l dist/*.zip`.
It keeps the main plugin file, `inc/`, `templates/`, `src/components/` (component PHP loaded at runtime), `languages/`, `assets/`, `vendor/`, `composer.json`, `README.md`, `CHANGELOG.md` and `LICENSE.md`. Check the result with `unzip -l dist/*.zip`.

### Release scripts

Expand Down
1 change: 1 addition & 0 deletions inc/Core/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ final class Assets extends AssetLoader implements Registrable, Shareable {
* Dynamic blocks are registered via their own AbstractBlock subclasses.
*/
private const STATIC_BLOCKS = [
// Directory names under assets/build/blocks/.
// wp:example:blocks
'example-block',
'example-block-interactive',
Expand Down
4 changes: 4 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ parameters:
# Optional: absent until `npm install` runs (a Composer-only checkout).
- node_modules (?)
- tests
ignoreErrors:
- identifier: foreach.emptyArray
path: inc/Core/Assets.php
reportUnmatched: false
Loading