Skip to content

Commit

Permalink
document transformer
Browse files Browse the repository at this point in the history
closes #141
  • Loading branch information
Boshen committed Jul 1, 2024
1 parent aa95899 commit 3a39a32
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
1 change: 1 addition & 0 deletions .vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const enConfig = defineLocaleConfig("root", {
],
},
{ text: "Parser", link: "/docs/guide/usage/parser" },
{ text: "Transformer", link: "/docs/guide/usage/transformer" },
{ text: "Resolver", link: "/docs/guide/usage/resolver" },
],
},
Expand Down
10 changes: 4 additions & 6 deletions src/docs/guide/usage/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ The Rust crate `oxc_parser` is production ready.

### Rust

Use the umbrella crate [oxc][url-oxc-crate] or individual [oxc_ast][url-oxc-ast-crate] and [oxc_parser][url-oxc-parser-crate] crates.
Use the umbrella crate [oxc][url-oxc-crate] or the individual [oxc_ast][url-oxc-ast-crate] and [oxc_parser][url-oxc-parser-crate] crates.

### Node.js
Rust usage example can be found [here](https://github.com/oxc-project/oxc/blob/main/crates/oxc_parser/examples/parser.rs).

The node binding [oxc-parser][url-oxc-parser-npm] is available for experimental use.
### Node.js (NAPI)

## Rust Usage

Check out [this example](https://github.com/oxc-project/oxc/blob/main/crates/oxc_parser/examples/parser.rs).
Use the experimental node binding [oxc-parser][url-oxc-parser-npm].

<!-- Links -->

Expand Down
22 changes: 22 additions & 0 deletions src/docs/guide/usage/transformer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Transformer

## Features

- [TypeScript Isolated Declarations Emit](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#isolated-declarations) without using the TypeScript compiler.

## Installation

### Rust

Use the umbrella crate [oxc][url-oxc-crate] with the `transformer` feature.

Rust usage example can be found [here](https://github.com/oxc-project/oxc/blob/main/crates/oxc_parser/examples/transformer.rs).

### Node.js (NAPI)

Use the experimental node binding [oxc-transformer][url-oxc-transformer-npm].

<!-- Links -->

[url-oxc-crate]: https://docs.rs/oxc
[url-oxc-transformer-npm]: https://www.npmjs.com/package/oxc-transformer
5 changes: 3 additions & 2 deletions src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ features:
details: 28x faster than enhanced-resolve
link: /docs/guide/usage/resolver
linkText: Usage guide
- title: Transformer 🚧
details: Babel compatible<br/>Isolated Declarations Dts Emit
link: /docs/guide/usage/transformer
- title: Formatter
details: Prettier compatible
- title: Transformer 🚧
details: Babel compatible
- title: Minifier
details: Faster and better at compression
- title: Rolldown Bundler 🚧
Expand Down

0 comments on commit 3a39a32

Please sign in to comment.