Skip to content

Add npm plugin-zip build using @wordpress/scripts#4

Merged
louwie17 merged 2 commits intotrunkfrom
add/plugin-zip-build
Apr 30, 2026
Merged

Add npm plugin-zip build using @wordpress/scripts#4
louwie17 merged 2 commits intotrunkfrom
add/plugin-zip-build

Conversation

@louwie17
Copy link
Copy Markdown
Contributor

Summary

  • Adds package.json with a plugin-zip script powered by @wordpress/scripts — run npm run plugin-zip to produce hey-woo.zip
  • Explicit files field in package.json ensures LICENSE is always bundled (wp-scripts' default discovery omits it)
  • Updates .distignore to exclude vendor/, tools/, docs/, skills/, and npm tooling files (package.json, package-lock.json, node_modules)
  • Adds *.zip to .gitignore so build artefacts aren't committed
  • Tracks package-lock.json for reproducible builds

No JS build step — this is a PHP-only plugin. @wordpress/scripts is a dev-only dependency.

Zip contents verified locally:

hey-woo/hey-woo.php
hey-woo/includes/**  (all 50 PHP class files)
hey-woo/LICENSE
hey-woo/README.md
hey-woo/package.json  (always included by npm-packlist when files field is set — harmless)

Test plan

  • npm install completes without errors
  • npm run plugin-zip produces hey-woo.zip with the expected contents (verify with unzip -l hey-woo.zip)
  • hey-woo.zip installs and activates on a WordPress + WooCommerce site (upload via WP Admin > Plugins > Add New > Upload)

🤖 Generated with Claude Code

louwie17 and others added 2 commits April 30, 2026 11:24
Wires up `npm run plugin-zip` via @wordpress/scripts so the repo can
produce an installable hey-woo.zip without a manual file-gathering step.
Explicit `files` field in package.json ensures LICENSE is always bundled
(wp-scripts' default discovery skips it). .distignore updated to exclude
vendor/, tools/, docs/, skills/, and the npm tooling files themselves;
.gitignore updated to ignore *.zip build artefacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On v* tag push: runs npm ci + plugin-zip, attaches hey-woo.zip to a
new GitHub release (with auto-generated release notes).
On workflow_dispatch: same build but no release — zip is uploaded as a
workflow artifact for manual inspection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@louwie17 louwie17 merged commit ab7e7a7 into trunk Apr 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant