npm.io
1.0.13 • Published 1 year agoCLI

tsswc

Licence
MIT
Version
1.0.13
Deps
8
Size
130 kB
Vulns
0
Weekly
0

TSSWC

JavaScript Style Guide

A library for compiling TypeScript into JavaScript using SWC.

Compiler reads from tsconfig.json.


Table of Contents


Install

npm i tsswc --save-dev
npm i @neumatter/swc-plugin-add-ext --save-dev

Usage

./tsconfig.json:
{
  "$schema": "https://json.schemastore.org/tsconfig",
  "include": ["src/**/*"],
  "exclude": ["dist", ".build", "node_modules"],
  "compilerOptions": {
    "rootDir": "./src" /* Specify the root folder within your source files. */,
    "outDir": "./dist" /* Specify an output folder for all emitted files. */,
  }
}
Emit declaration files:
tsswc --dts
Compile only:
tsswc
Compile & run without emitting files:
node --loader=tsswc/loader.js ./test/index.ts

Keywords