Configure ember-mug as a publishable CLI package - #18
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
binfield to map theember-mugcommand to the compiled CLI entry point (apps/cli/dist/cli.js)filesfield to explicitly include only the necessary CLI distribution files and package.json in the npm package, reducing package sizeprepublishOnlyscript to ensure the package is built before publishing to npmImplementation Details
apps/cli/dist/cli.js, which will be executed when users run theember-mugcommand after installationfilesfield, we exclude unnecessary files (like source code, tests, etc.) from the published npm packageprepublishOnlyhook automatically runsnpm run buildbefore publishing, ensuring the distribution files are up-to-datehttps://claude.ai/code/session_01A8K3oZvEHae1GxAvdhUrp1