This is a template for a new NPM package.
- PNPM as more efficient Node dependency manager
- TypeScript
- Tests via jest
- Generated code documentation via TypeDoc
- SonarCloud integration
- Semantic Release for fast releases
- Commitizen for consistent commits
- CI configurations for TravisCI and Drone CI
If you want to use this template as basis of a new project, please make sure to do the following:
- Adjust package.json (package name, description, keywords, repository url)
- Copy the CI configuration you want to use from .ci folder into the project root
- Set
sonar.organization
in sonar-project.properties andsonarcloud.organization
in TravisCI configuration (if you're using it) - If this package should be private, remove .npmrc file
- Remove sample files or adjust them
Make sure to create the following environment variables:
- SONAR_TOKEN: access token for SonarCloud (required for code analysis)
- NPM_TOKEN: access token for NPM (required for publishing packages)
- GH_TOKEN: access token for GitHub (required for publishing releases)
If you are using TravisCI, you can use semantic-release-cli for setting up the NPM and GitHub tokens.