ts2civet
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.10 • Public • Published

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!"

Readme

Keywords

Package Sidebar

Install

npm i ts2civet

Weekly Downloads

2

Version

1.0.0-beta.10

License

MIT

Unpacked Size

79.3 kB

Total Files

8

Last publish

Collaborators

  • esthe