dragenet / basic-typescript-boilerplate

A modern TypeScript project setup, for Node.js.

Home Page:https://www.metachris.com/2021/03/bootstrapping-a-typescript-node.js-project/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic TypeScript Boilerplate for 2021

Build and test status

Simplified fork of TypeScript project boilerplate created by metachris with modern tooling, for Node.js programs and libraries. Get started quickly and right-footed 🚀

See also the introduction blog post: Starting a TypeScript Project in 2021

Getting Started

# 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 (or npm publish)

Documentation, published with CI

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/

References

Feedback

Reach out with feedback and ideas create a new issue

About

A modern TypeScript project setup, for Node.js.

https://www.metachris.com/2021/03/bootstrapping-a-typescript-node.js-project/

License:MIT License


Languages

Language:JavaScript 100.0%