Skip to content

chore(npm): build before publish and trim published files - #32

Merged
daedeloth merged 1 commit into
masterfrom
chore/publish-build-and-package-files
Sep 8, 2026
Merged

chore(npm): build before publish and trim published files#32
daedeloth merged 1 commit into
masterfrom
chore/publish-build-and-package-files

Conversation

@daedeloth

Copy link
Copy Markdown
Member

Add a prepublishOnly hook so npm publish cannot ship a stale or missing dist bundle. It runs bower install first because the grunt requirejs build reads app/scripts/vendor/**, mirroring what the CI workflows already do.

Add a files allowlist so the tarball carries only the built bundle and its source map (plus package.json/README/LICENSE, which npm always includes). This drops app/, docs/, tools/, wrapper/, the Gruntfile and bower config: 105 files / 28.0 MB unpacked becomes 5 files / 211 kB, most of the savings being the example emoji fonts.

Add a prepublishOnly hook so `npm publish` cannot ship a stale or
missing dist bundle. It runs `bower install` first because the grunt
requirejs build reads app/scripts/vendor/**, mirroring what the CI
workflows already do.

Add a files allowlist so the tarball carries only the built bundle and
its source map (plus package.json/README/LICENSE, which npm always
includes). This drops app/**, docs/**, tools/**, wrapper/**, the
Gruntfile and bower config: 105 files / 28.0 MB unpacked becomes
5 files / 211 kB, most of the savings being the example emoji fonts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@daedeloth
daedeloth merged commit 11197eb into master Sep 8, 2026
2 checks passed
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📦 PR Preview deployed!

Examples are available at:

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