Skip to content
/ tnode Public

Simple node wrapper that runs esbuild on TS files

License

Notifications You must be signed in to change notification settings

nabla/tnode

Repository files navigation

tnode npm

Simple node wrapper that runs esbuild on TS files.

Install

npm i -D @nabla/tnode
  • For esbuild@0.17 use @nabla/tnode@0.9 (latest)
  • For esbuild@0.16 use @nabla/tnode@0.8
  • For esbuild@0.15 use @nabla/tnode@0.7

Usage in package.json scripts

{
  "scripts": {
    "codegen": "tnode scripts/codegen.ts"
  }
}

Usage with Jest

Add in package.json

{
  "jest": {
    "rootDir": "src",
    "transform": {
      "\\.ts": "@nabla/tnode/jest"
    }
  }
}

Usage in independent scripts

npm i -g @nabla/tnode
#!/usr/bin/env tnode

console.log("It just works!");