0.0.5 • Published 3 years ago

exec-ts v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

exec-ts

Transpiles TypeScript files to JavaScript and executes them.

Usage

npx exec-ts ./your-ts-file.ts

CLI Arguments

  • --require module Preload the specified module at startup before executing the script. Similar to node's --require flag. Useful in combination with tsconfig-paths to support aliases in your TypeScript scripts. Can be specified multiple times to preload multiple modules. --require module-a --require module-b

  • --project ./path/to/tsconfig.json Specify path to tsconfig.json file. Default behavior is to discover the closest tsconfig.json file starting from the folder of the executed file traversing up.

Passing arguments to scripts

You need to use -- before passing arguments to the TS file.

npx exec-ts ./your-ts-file.ts -- --your-arg=is-valid

Arguments before -- are parsed by exec-ts itself.

Caveats

Uses esbuild, hence esbuild caveats apply.

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago