Skip to content

Latest commit

Β 

History

History
124 lines (80 loc) Β· 2.34 KB

File metadata and controls

124 lines (80 loc) Β· 2.34 KB

Contributing to starterminiapp-cli

This guide is for maintainers and contributors who want to develop, test, and publish the CLI itself.


πŸ› οΈ Local Development

1. Clone and test locally

git clone https://github.com/patnir/starterminiapp-cli.git
cd starterminiapp-cli
npm install

Run locally (without publishing):

node bin/index.mjs test-app

or test it as if it were installed:

npx ./bin/index.mjs test-app

2. Update the CLI code

Edit bin/index.mjs as needed:

  • To point to a new starter repo
  • To change installation steps
  • To add flags or behaviors (e.g. --no-install, --branch main)

3. Version bump

Each time you publish a new release, bump the version number in package.json:

# Patch: small fixes
npm version patch

# Minor: new features, backward compatible
npm version minor

# Major: breaking changes
npm version major

This will:

  • Update the version number
  • Create a new git tag
  • Commit the change automatically

Then push the tag:

git push && git push --tags

4. Publish to npm

Make sure you're logged in:

npm whoami

Then publish the latest version:

npm publish --access public

That automatically updates what users get when they run:

npx starterminiapp my-mini-app

5. Testing after publishing

After publishing a new version, test with:

npx starterminiapp@latest test-app

You can also install a specific version explicitly:

npx starterminiapp@1.1.0 my-mini-app

πŸ“ Command Summary

Action Command
Create new app npx starterminiapp my-mini-app
Version bump npm version patch
Publish update npm publish --access public
Test latest npx starterminiapp@latest test-app

πŸ” Quick Notes

  • Every publish replaces the version users get when they run npx starterminiapp.
  • You must bump the version (e.g. npm version patch) before every new npm publish β€” npm doesn't allow re-publishing the same version number.
  • The README doubles as your GitHub front page and what appears on npmjs.com/package/starterminiapp.