swc_plugin_runner 4.0.0

Runner for swc plugins. This crate is INTERNAL crate and used by swc itself.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::error::Error;

use vergen::{BuildBuilder, CargoBuilder, Emitter};

fn main() -> Result<(), Box<dyn Error>> {
    let build = BuildBuilder::all_build()?;
    let cargo = CargoBuilder::default()
        .dependencies(true)
        .name_filter("*_ast")
        .build()?;

    Emitter::default()
        .add_instructions(&build)?
        .add_instructions(&cargo)?
        .emit()?;

    Ok(())
}