@lib/run
v1.0.3
Published
Run TypeScript in Node
Readme
@lib/run
Compile and run TypeScript in Node with source map support in about 50 lines of code.
Directly run a TypeScript file right now without installing anything but Node:
npx @lib/run script.tsOr install:
npm install --save-dev @lib/runThen:
npx run script.tsOr within a package.json script:
run script.tsThe option -p will require() a JS file before loading the TypeScript compiler. It can be given multiple times:
npx run -p ./preload-1.js -p ./preload-2.js script.tsLicense
0BSD, which means use as you wish and no need to mention this project or its author. Consider it public domain in practice.
