Converts TypeScript code to concise civet. Demo at ts2civet.esthe.win
WIP! Use carefully and double-check output.
npx ts2civet --help
Examples:
$ ts2civet src/**/*.ts
> Transformed src/a.ts to src/a.civet
> Transformed src/b.ts to src/b.civet
> Transformed src/folder/file.ts to src/folder/file.civet
$ ts2civet src/index.ts -o-
> console.log "Hello, world!"
$ ts2civet src/a.ts -o src/civety-a.civet src/b.ts -o. src/import.ts -o-
> Transformed src/a.ts to src/civety-a.civet
> Transformed src/b.ts to src/b.civet
> console.log "Hello, world!"
import { transform } from "ts2civet"
const code = transform('console.log("Hello, world!")', "./code.ts") // console.log "Hello, world!"