This is a boilerplate for creating a roboust Typescript NPM modules. It uses:
- Vite for bundling
- Vitest for testing
- XO for linting
- Prettier for formatting
- Typescript for typing
- Typedoc for documentation
- Fork or clone this repo
- Change the name of the module, author and version in
package.json
- Set the license
- Set private to
false
if you want to publish the module to NPM, or delete it all together - Change the name of the module in
vite.config.ts
- Change main and module in
package.json
to point to the entry point of the module defined invite.config.ts
- Setup prettier, xo and vscode to your liking
- Change README
- Upon adding js or ts files that you do not want to be linted by XO, add them to
.eslintignore
. - Optionally, configure typedoc.
- Happy coding!
- Run
npm ci
- Run
npm run dev
to start development server - Run
npm run build
to build the module - Run
npm run test
to run tests - Run
npm run lint
to lint the code - Run
npm run lint:fix
to fix linting errors - Run
npm run test:coverage
to run tests with coverage - Run
npm run format
to format the code - Run
npm run publish
to publish the module to NPM - Run
npm run docgen
to generate documentation
- Define guidelines for browser testing
This project is licensed under the Unlicense.