typescript-runner
v1.0.0
Published
This npm package aims to automate the build and execution of your typescript project.
Downloads
5
Maintainers
Readme
typescript-runner
This npm package aims to automate the build and execution of your typescript project.
Installation
install with npm
npm install typescript-runner
After that put the following in the script tag of package.json
{
"scripts": {
"[npm-script-command]" : "bash ./node_modules/typescript-runner/tsRunner.sh"
}
}
preferably replace "[npm-script-command]" with "start" , so that it can work wihtout using run.
Usage
This only works if your typescript files are in src folder and your javascript files are in dist folder. You can change the behaviour from the bash script . Also this is primarily suited for Unix-based systems like Linux and macOS
- With filename
node [npm-script-command] [optional-filename.js]
Replace [optional-filename.js]
with the name of the typescript file you want to run and replace [npm-script-command] with the name of script command you used above .
- Without filename
node [npm-script-command]
If no filename is provided, the script will run the most recently saved JavaScript file.