Skip to content

lukeed/tsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

37e122b · Jan 20, 2024

History

74 Commits
Jun 27, 2023
Oct 2, 2021
Oct 3, 2021
Oct 3, 2021
Oct 13, 2021
Jun 27, 2023
Nov 28, 2022
Oct 2, 2021
Oct 3, 2021
Oct 2, 2021
Oct 3, 2021
Nov 28, 2022
Jan 20, 2024
Oct 5, 2021

Repository files navigation

tsm
TypeScript Module Loader

Features

The ESM Loader API is still experimental and will change in the future.

Install

# install as project dependency
$ npm install --save-dev tsm

# or install globally
$ npm install --global tsm

Usage

Note: Refer to /docs/usage.md for more information.

# use as `node` replacement
$ tsm server.ts

# forwards any `node` ENV or flags
$ NO_COLOR=1 tsm server.ts --trace-warnings

# use as `--require` hook
$ node --require tsm server.tsx
$ node -r tsm server.tsx

# use as `--loader` hook
$ node --loader tsm main.jsx

License

MIT © Luke Edwards