Skip to content

Configure ember-mug as a publishable CLI package - #18

Merged
singerbj merged 2 commits into
mainfrom
claude/fix-npm-executable-kCN3k
Feb 2, 2026
Merged

Configure ember-mug as a publishable CLI package#18
singerbj merged 2 commits into
mainfrom
claude/fix-npm-executable-kCN3k

Conversation

@singerbj

@singerbj singerbj commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Summary

This PR configures the ember-mug package for npm publication as a CLI tool by adding bin entry point configuration and specifying which files should be included in the published package.

Key Changes

  • Added bin field to map the ember-mug command to the compiled CLI entry point (apps/cli/dist/cli.js)
  • Added files field to explicitly include only the necessary CLI distribution files and package.json in the npm package, reducing package size
  • Added prepublishOnly script to ensure the package is built before publishing to npm

Implementation Details

  • The CLI entry point is located at apps/cli/dist/cli.js, which will be executed when users run the ember-mug command after installation
  • By specifying the files field, we exclude unnecessary files (like source code, tests, etc.) from the published npm package
  • The prepublishOnly hook automatically runs npm run build before publishing, ensuring the distribution files are up-to-date

https://claude.ai/code/session_01A8K3oZvEHae1GxAvdhUrp1

The root package was missing a bin field, causing "could not determine
executable to run" error when using npx ember-mug@latest. Added bin
pointing to CLI dist, files array for proper publishing, and
prepublishOnly script to ensure build runs before publish.

https://claude.ai/code/session_01A8K3oZvEHae1GxAvdhUrp1
The root package was missing the CLI runtime dependencies, causing
npm to install only 1 package with no dependencies. Added all CLI
dependencies (ink, react, chalk, @stoprocent/noble, etc.) to the
root package.json so they're installed when users run npm install -g
ember-mug.

Also added type: module, description, and engines fields to match
the CLI package configuration.

https://claude.ai/code/session_01A8K3oZvEHae1GxAvdhUrp1
@singerbj
singerbj merged commit 265c496 into main Feb 2, 2026
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.

2 participants