Also see this answer. Basically, inside another project where you want to test the plugin, you can install it as an npm package via a local path:
npm link /path/to/eslint-plugin-erb
Other useful commands:
npm ls --global
Finally to remove the link:
npm unlink eslint-plugin-erb
We develop directly on main
. Whenever a release is ready, we create a new release tag and publish to npm.
- Main branch: protected, only PRs allowed (tests must pass). Use squash commits (!)
- Finally: continuous release by creating a
release/*
branch and merging it intomain
via a PR.
As this is only a small project, we haven't automated publishing to the NPM registry yet and instead rely on the following manual workflow.
- Make sure the tests pass locally:
npm test
✔ - Make another commit on the
dev
branch bumping the npm version in thepackage.json
. For that, use:
npm run bump-version -- [<newversion> | major | minor | patch]
- ⚠ Copy the version specifier from
package.json
into theindex.js
meta information object. - Call the respective PR for the final changes "Continuous Release <version.number>". Merge this PR into
main
. - Create a new release via the GitHub UI and assign a new tag alongside that.
- Fetch the tag locally (
git fetch
) and publish to npm vianpm run publish-final
. You probably have to login to npm first (npm login
). - Check that the release is available here on npm. Enjoy ✌