vec: moved compute functions to computer

This commit is contained in:
nym21
2025-03-11 16:27:45 +01:00
parent 64d73b93e4
commit b9e679a514
14 changed files with 413 additions and 350 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ color-eyre = { workspace = true }
jiff = { workspace = true }
log = { workspace = true }
minreq = { workspace = true }
oxc = { version = "0.56.5", features = ["codegen", "minifier"] }
oxc = { version = "0.57.0", features = ["codegen", "minifier"] }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { version = "1.44.0", features = ["full"] }
+4 -2
View File
@@ -16,7 +16,9 @@ pub fn minify_js(path: &Path) -> String {
let allocator = Allocator::default();
let mut program = Parser::new(&allocator, &source_text, source_type).parse().program;
let parser_return = Parser::new(&allocator, &source_text, source_type).parse();
let mut program = parser_return.program;
let minifier_return = Minifier::new(MinifierOptions {
mangle: Some(MangleOptions::default()),
@@ -33,7 +35,7 @@ pub fn minify_js(path: &Path) -> String {
source_map_path: None,
legal_comments: LegalComment::None,
})
.with_symbol_table(minifier_return.symbol_table)
.with_scoping(minifier_return.scoping)
.build(&program)
.code
}