A repository for learning purposes.
Make sure you have Node.js and Git installed on your computer.
Open a directory in your terminal where you wish to clone this repository to. Run
git clone https://github.com/kovacsandor/typescript-playground
Install packages
npm install
Build
npm run build
Start
npm start
Develop
npm run watch
Press F5
Create a default package.json file.
npm init --yes
Add a tsconfig.json file with the following content.
{
"compilerOptions": {
"outDir": "dist"
},
"exclude": ["node_modules"]
}
Add libraries to the project.
npm install --save-dev concurrently nodemon typescript
Add the following scripts to the package.json file.
{
"build": "tsc",
"debug": "tsc --sourceMap",
"start": "node ./dist",
"watch": "concurrently --kill-others \"npm:watch-*\"",
"watch-node": "nodemon ./dist",
"watch-ts": "tsc --watch"
}