Skip to content

Instantly share code, notes, and snippets.

@lesterfernandez
Created January 14, 2022 14:40
Show Gist options
  • Save lesterfernandez/a7c2402deac427e3e5e153763b5ffa22 to your computer and use it in GitHub Desktop.
Save lesterfernandez/a7c2402deac427e3e5e153763b5ffa22 to your computer and use it in GitHub Desktop.
Automatically build TypeScript and run JavaScript on every change
"scripts": {
"start": "node dist/index.js",
"build": "npx tsc",
"dev": "tsc-watch --onSuccess \"node ./dist/index.js\""
},
"devDependencies": {
"tsc-watch": "^4.6.0",
"typescript": "^4.5.4"
},
@lesterfernandez
Copy link
Author

This is assuming your tsconfig is configured to output built typescript to the "dist" folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment