Simplified fork of TypeScript project boilerplate created by metachris with modern tooling, for Node.js programs and libraries. Get started quickly and right-footed 🚀
- TypeScript 4
- Linting with typescript-eslint (tslint is deprecated)
- Testing with Jest (and ts-jest)
- Automatic API documentation with TypeDoc
- Nodemon for development mode files change auto-reload
See also the introduction blog post: Starting a TypeScript Project in 2021
# Clone the repository (you can also click "Use this template")
git clone https://github.com/dragenet/basic-typescript-boilerplate.git your_project_name
cd your_project_name
# Edit `package.json` and `tsconfig.json` to your liking
...
# Install dependencies
yarn install
# Now you can run various yarn commands:
yarn lint
yarn clean
yarn docs
yarn build
yarn start
yarn dev
...
- Take a look at all the scripts in
package.json
- For publishing to npm, use
yarn publish
(ornpm publish
)
You can auto-generate API documentation from the TyoeScript source files using TypeDoc. The generated documentation can be published to GitHub / GitLab pages through the CI.
Generate the documentation, using src/main.ts
as entrypoint (configured in package.json):
yarn docs
The resulting HTML is saved in docs/
.
You can publish the documentation through CI:
This is the documentation for this boilerplate project: https://metachris.github.io/typescript-boilerplate/
- Blog post: Starting a TypeScript Project in 2021
- TypeScript Handbook
- tsconfig docs
- typescript-eslint docs
- GitHub Actions, GitLab CI
Reach out with feedback and ideas create a new issue