This is a template repository for Node.js projects. It includes configuration for:
- TypeScript
- ESLint
- Prettier
- Jest
- Commitlint
- Husky
- Semantic Release
- Dependabot
- GitHub Workflows
-
Click the "Use this template" button to create a new repository based on this template.
-
Clone the new repository to your local machine
git clone https://github.com/<your-username>/<new-repo>.git
-
Install dependencies
npm install
-
Build the project
npm run build
-
Lint the code
npm run lint
-
Run tests
npm run test
build- Compiles TypeScript code to JavaScriptbuild:clean- Removes old build and compiles fresh buildbuild:dev- Watches for changes and compileslint- Lints code using ESLintlint:fix- Lints and fixes issues automaticallytest- Runs Jest teststest:coverage- Runs tests and generates coverage reporttest:watch- Runs tests in watch mode
-
Node.js CI/CD- Runs on push tomainanddevelopment. Installs dependencies, builds project, runs linter and tests. Updates package version ondevelopment. Creates GitHub release onmain. -
Auto-comment on PR- Runs on new or updated PRs. Gathers metrics about PR then posts detailed comment.
Please check the contribution guide to learn more about how to contribute to this project.