Template Node is a Node.js project scaffolding tool designed to speed up the initial setup of Node.js applications. This repository provides a solid foundation for building scalable and maintainable Node.js projects, with built-in best practices and commonly used configurations.
- TypeScript: Use TypeScript for a better development experience and improved code quality.
- ESLint: Lint your code with ESLint to maintain consistent coding standards.
- Prettier: Format your code with Prettier to keep it clean and consistent.
- Jest: Test your code with Jest to ensure its correctness and reliability.
- Husky: Use Husky to run tasks on Git hooks and enforce code quality.
- Lint-Staged: Run ESLint and Prettier on staged files to catch errors before committing.
- Commitlint: Enforce conventional commit messages to keep your commit history clean and organized.
- GitHub Actions: Use GitHub Actions for continuous integration and automated testing.
Make sure you have Node.js and Bun installed on your machine before running the project.
-
Clone the repository:
git clone --depth 1 https://github.com/jdevelop-io/template-node.git cd template-node
-
Remove the
.git
directory to start with a clean git history:rm -rf .git
-
Initialize a new git repository:
git init
-
Install the dependencies:
bun install
bun run build
: Build the project.bun run test
: Run the tests.bun run test:watch
: Run the tests in watch mode.bun run test:coverage
: Run the tests with coverage.bun run test:coverage:watch
: Run the tests with coverage in watch mode.bun run lint
: Lint the code and fix linting errors.bun run lint:check
: Check the code for linting errors.bun run format
: Format the code and fix formatting errors.bun run format:check
: Check the code for formatting errors.
template-node
├── .github
│ ├── workflows
│ │ ├── build.yml
│ │ └── tests.yml
├── node_modules
├── coverage
├── build
├── src
├── README.md
├── LICENSE
├── commitlint.config.mjs
├── eslint.config.mjs
├── jest.config.ts
├── lint-staged.config.mjs
├── prettier.config.mjs
├── tsconfig.json
├── bun.lockb
└── package.json
Contributions are welcome! If you have any ideas, suggestions, or issues, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.