Boilerplate for creating a new NPM package with ESM and CJS support.
pnpm inpx lefthook install
Configure the following files:
package.json- Edit
.changeset/config.jsonto your repository
In Github settings:
Actions > General > Workflow permissionsRead and write permissionsAllow Github Actions to create and approve pull requests
Secrets and variables > ActionsRepository Secrets > Actions > create NPM_TOKEN
- Create a branch and make changes.
- Create a new changeset entry:
pnpm changeset - Commit your changes and create a pull request.
- Merge the pull request
- A new PR will be created with the changeset entry/ies.
- When the PR is merged, the package versions will be bumped and published and the changelog updated.