Getting Started
Installation
Click the Use this template button to create a new repository.
You can also run bun create Enalmada/npm-module-template <your-new-library-name>
Github settings
- add NPM_TOKEN with access to deploy to npm to environment variables
- Actions > General > Workflow Permissions
- Read and Write (to allow changesets to create changelog, and release)
- Allow github actions to create and approve PR
Git settings
Follow the directions here to modify your git settings to properly handle the lockfile
git config --global diff.lockb.textconv bungit config --global diff.lockb.binary trueWorkflow
- install dependencies
bun install - lint files
bun lint:fix - run tests
bun run test(notbun testas we are not using native tests) - run build
bun run build(notbun buildas we are using build script) - create changeset before PR
changesetand choose appropriate semver and changelog
Migrate existing repository
git remote add template https://github.com/Enalmada/npm-module-templategit fetch templategit merge template/main --allow-unrelated-histories- resolve conflicts and merge