An open API service indexing awesome lists of open source software.

https://github.com/yisar/node_swc

swc node binding use wasm
https://github.com/yisar/node_swc

Last synced: 9 months ago
JSON representation

swc node binding use wasm

Awesome Lists containing this project

README

          

# node_swc
swc node binding use wasm

### Build

Make sure you have rust wasm-pack installed.

```shell
$ yarn build # build wasm, node
```

### Usage

```js
import { parseSync, printSync } from 'node-swc'

const ast = parseSync(`const a: string = "hello world"`, {
syntax: 'typescript'
})

const { code } = printSync(ast, {
minify: true
})
```
### License

MIT