Publishing to npm
One-time
Section titled “One-time”- Log in with an account that may publish the package:
npm login. - Confirm the name is yours:
npm view @mindovermachine-dev/remote-astro-theme. - Enable two-factor authentication on the account.
Each release
Section titled “Each release”- Make sure the working tree is clean and
npm run checkpasses. - Bump the version, which also creates a git tag:
npm version patch(orminor/major). - Check what will be published:
npm pack --dry-run. Onlybin/,src/,README.mdandpackage.jsonshould be listed. - Publish:
npm publish. ThepublishConfiginpackage.jsonalready sets public access. - Push the commit and the tag:
git push --follow-tags.
Content repos then depend on it as a normal package:
{ "devDependencies": { "@mindovermachine-dev/remote-astro-theme": "^0.1.0" } }prepublishOnlyruns the checks, so a broken file blocks the publish.- The
licensefield is not set yet. Add one before the first public release.