1.0.0 • Published 1 year ago

typescript-runner v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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

  1. 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 .

  1. Without filename
node [npm-script-command]

If no filename is provided, the script will run the most recently saved JavaScript file.

1.0.0

1 year ago