@enalmada/npm-module-template
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

npm-module-template

What

  • bun build - with types the best I could (see build notes below)
  • eslint with prettier formatting
  • fixpack to normalize package.json changes along with npm pkg fix
  • husky pre commit hooks
  • changesets change and release workflow
  • renovate dependency management

Installation

Click the Use this template button to create a new repository (or run bun create Enalmada/npm-module-template <your-new-library-name>)

To switch existing repository

  • git remote add template https://github.com/Enalmada/npm-module-template
  • git fetch template
  • git merge template/main --allow-unrelated-histories
  • resolve conflicts and merge

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

Workflow

  • install dependencies bun install
  • lint files bun lint:fix
  • run tests bun run test (not bun test as we are not using native tests)
  • run build bun run build (not bun build as we are using build script)
  • create changeset before PR changeset and choose appropriate semver and changelog

TODO

  • [ ] tests framework to bun (when bun supports mocking modules)

Alternative Tech

inspiration

Notes

Build

Contribute

Using changesets so please remember to run "changeset" with any PR that might be interesting to people on an older template. Although this isn't being deployed as a module, I would like to call out things worth keeping in sync.

Readme

Keywords

Package Sidebar

Install

npm i @enalmada/npm-module-template

Weekly Downloads

0

Version

0.0.7

License

MIT

Unpacked Size

245 kB

Total Files

27

Last publish

Collaborators

  • enalmada