0.0.5 • Published 4 years ago
exec-ts v0.0.5
exec-ts
Transpiles TypeScript files to JavaScript and executes them.
Usage
npx exec-ts ./your-ts-file.tsCLI Arguments
--require modulePreload the specified module at startup before executing the script. Similar to node's--requireflag. 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.jsonSpecify path totsconfig.jsonfile. Default behavior is to discover the closesttsconfig.jsonfile 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-validArguments before -- are parsed by exec-ts itself.