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
- Host: GitHub
- URL: https://github.com/yisar/node_swc
- Owner: yisar
- License: mit
- Created: 2021-07-08T05:45:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-09T05:17:11.000Z (over 4 years ago)
- Last Synced: 2025-03-28T23:22:37.044Z (10 months ago)
- Language: Rust
- Size: 5.3 MB
- Stars: 24
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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