Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Enalmada/npm-module-template
starter template for npm modules
https://github.com/Enalmada/npm-module-template
Last synced: 3 months ago
JSON representation
starter template for npm modules
- Host: GitHub
- URL: https://github.com/Enalmada/npm-module-template
- Owner: Enalmada
- License: mit
- Created: 2023-10-03T23:45:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-18T12:32:40.000Z (6 months ago)
- Last Synced: 2024-05-19T00:40:04.905Z (6 months ago)
- Language: JavaScript
- Homepage: https://npm-module-template.vercel.app
- Size: 1.28 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# npm-module-template
A starter template for npm modules. Currently setup with the following tech:
* [bun](https://bun.sh/docs/bundler) build - with types the best I could (see build notes below)
* [lint-staged](https://www.npmjs.com/package/lint-staged) check git staged files
* [vitest](https://vitest.dev/) test framework
* [eslint](https://eslint.org/) with [prettier](https://prettier.io/) formatting
* [fixpack](https://www.npmjs.com/package/fixpack) to normalize package.json changes along with `npm pkg fix`
* [husky](https://typicode.github.io/husky/) pre commit hooks
* [changesets](https://github.com/changesets/changesets) change and release workflow
* [renovate](https://github.com/renovatebot/renovate) dependency management
* [Github Actions](https://github.com/features/actions)
* [Starlight](https://github.com/withastro/starlight) Documentation
## Installation
Click the [Use this template](https://github.com/Enalmada/npm-module-template/generate) button to create a new repository
(or run `bun create Enalmada/npm-module-template `)## Documentation
Read the documentation [website](https://npm-module-template.vercel.app/)### TODO
- [ ] tests framework to bun (when bun supports mocking modules)### inspiration
* [bun-lib-starter](https://github.com/wobsoriano/bun-lib-starter)## Notes
### Build
* Using [latest module and target settings](https://stackoverflow.com/questions/72380007/what-typescript-configuration-produces-output-closest-to-node-js-18-capabilities/72380008#72380008) for current LTS
* using tsc for types until [bun support](https://github.com/oven-sh/bun/issues/5141#issuecomment-1727578701) comes around## Contribute
Using [changesets](https://github.com/changesets/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.