Commit graph

5 commits

Author SHA1 Message Date
Boshen
05e97b615d
chore: fix clippy warning 2024-06-20 23:22:01 +08:00
Boshen
fe38a20715
refactor(napi/transform): output normal error messages 2024-06-20 23:14:17 +08:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt 2024-06-19 00:48:30 +08:00
Boshen
5c38a0fd69 feat(codegen)!: new code gen API (#3740)
This PR introduces two type alias to avoid the confusing const generic `pub struct Codegen<'a, const MINIFY: bool>`

* CodeGenerator - Code generator without whitespace removal.
* WhitespaceRemover - Code generator with whitespace removal.

Usage is changed to a builder pattern:

```rust
CodeGenerator::new()
  .enable_comment(...)
  .enable_sourcemap(...)
  .build(&program);
```
2024-06-18 15:50:12 +00:00
Boshen
f42c325a06 refactor(napi): change "isolated declarations" to "transform" (#3721) 2024-06-17 14:09:18 +00:00