UNPKG

@septh/ts-run

Version:

The minimalist TypeScript script runner for Node

41 lines (29 loc) 1.23 kB
<p> ![NPM Version](https://img.shields.io/npm/v/@septh/ts-run?label=latest) ![Node](https://img.shields.io/node/v-lts/%40septh%2Fts-run) ![NPM Downloads](https://img.shields.io/npm/dm/@septh/ts-run) ![NPM License](https://img.shields.io/npm/l/@septh/ts-run) </p> # ts-run > The minimalist TypeScript script runner for NodeJS. Run TypeScript scripts from the command line as if they were plain JavaScript. ```sh ts-run path/to/script.ts ``` See [the repo on Github](https://github.com/Septh/ts-run#readme) for full documentation. ### Features - Just-in-time TypeScript transpilation so fast you won't even notice. - Generates source maps for accurate stack traces. - Does not spawn another process to transpile TypeScript. - Does not spawn another Node process to run your script. - Strictly follows modern Node semantics for ESM and CommonJS modules. - Zero config: no config file, no command line arguments, no environment variables, no nothing. - Does not even need a `tsconfig.json`. - Works with test runners. - Extra-light: only 220 kilobytes installed! - Zero dependency! ### Non-features - Not for running full-blown TypeScript projects. - No REPL support. ### Licence MIT.