Answers for "typescript with nodemon"

6

install nodemon typescritp

npm i -D typescript ts-node nodemon @types/node
Posted by: Guest on July-26-2021
0

using nodemon with typescript

nodemon --watch "src/**" --ext "ts,json" --ignore "src/**/*.spec.ts" --exec "ts-node src/index.ts"
Posted by: Guest on December-03-2020
0

typescript with nodemon

watch that video, very useful

add this to your scripts object in package.json:

"start:ts": "tsc -w",
"start:js": "nodemon build/index.js",
"start": "concurrently npm:start:*"

in tsconfig.json uncomment "rootDir" and "outDir"
assuming your ts files will be in '/src' and
your js files compiled to '/build', change the configs to:

"rootDir": "./src", 
"outDir": "./build",

make sure you have typescript, nodemon, and concurrently installed either
in your project, or globally

then, in your project folder, run in terminal: 'npm start'
Posted by: Guest on September-24-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language