TS Template is a TypeScript project template that provides a solid foundation for building TypeScript applications. It comes with a set of useful scripts, configurations, and development tools to streamline your development process.
- Pre-configured TypeScript setup
- Ready-to-use linting and code formatting
- Unit testing using Jest
- Husky integration
Before you begin, ensure you have the following installed on your machine:
Node.js (version >= 14)
npm (usually comes with Node.js installation)
Clone the repository:
npx degit dariasmyr/ts-template my-appInstall Dependencies:
npm installTo run the project in development mode with automatic restarts (using Nodemon), use:
npm run start:devTo run the project in production mode, use:
npm run start:prodThis command will build the project using the TypeScript compiler and then start the application.
Run unit tests using:
npm testTo run tests in watch mode:
npm test:watchTo generate a test coverage report:
npm test:covTo check your code for linting errors:
npm run lintTo automatically fix linting errors:
npm run lint:fixAdditional Scripts
npm run ts:check: Run TypeScript type checking without emitting files.
npm run check: Run TypeScript type checking and linting.
npm run test:e2e: Run end-to-end tests using Jest with a custom configuration.
npm run test:debug: Run tests in debug mode.
To update project dependencies, you can use the following command to check for updates and update your package.json:
npm run updateThis project is licensed under the MIT License.
Created by dasha.smyr@gmail.com.
Contributions are welcome. Feel free to submit a pull request. ❤️❤️❤️