In order to use this repo as a template, first create a new repo on GitHub by clicking on the "Use this template" button. This will create a new repo in your account (just as forking a repo does on GitHub). Then you can clone the repo and start working on it on your machine.
This is a template project that makes it easy to work w/ Node.js w/ TypeScript and Jest projects.
Make sure to run npm install
before running the scripts or the IDEA Run Configurations shown
below.
You can run the following npm scripts:
npm run start
- This runsmain.ts
npm run test
- This runs all the Jest tests.
✨ Note there is no
build
script, because this project usestsm
in order to quickly compile and run TypeScript files using Node.js.
You can also use IDEA Run Configurations that are included.
Run all tests
- This runs all the tests in Jest (usingts-jest
).main.ts
- This uses Node.js w/tsm
to run thesrc/main.ts
file.- The following npm scripts are provided.
- Run the tests (
test
). - Watch all the tests running (
test-watch
). - Run the
main.ts
file (start
). - Run the linter (
lint
).
Here are the steps to create a remote called template
. When there are changes to this repo, you
can pull the changes from and then merge those changes into main
.
git remote add template https://github.com/nazmulidris/ts-node-dev-template
git pull template main
💡 You can get more info on this topic here.