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
falseif 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.jsonto 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 devto start development server - Run
npm run buildto build the module - Run
npm run testto run tests - Run
npm run lintto lint the code - Run
npm run lint:fixto fix linting errors - Run
npm run test:coverageto run tests with coverage - Run
npm run formatto format the code - Run
npm run publishto publish the module to NPM - Run
npm run docgento generate documentation
- Define guidelines for browser testing
This project is licensed under the Unlicense.