ts2civet
v1.0.0-beta.10
Published
Converts typescript code to civet code
Downloads
6
Readme
ts2civet
Converts TypeScript code to concise civet. Demo at ts2civet.esthe.win
WIP! Use carefully and double-check output.
CLI
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!"
API
import { transform } from "ts2civet"
const code = transform('console.log("Hello, world!")', "./code.ts") // console.log "Hello, world!"