mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 16:02:28 +00:00
add option to build wasm packages for nodejs
This commit is contained in:
@@ -65,15 +65,19 @@ const targets = [
|
||||
# -Z build-std=panic_abort,std -Z build-std-features=panic_immediate_abort
|
||||
|
||||
# Build all separately
|
||||
def 'main all' [ --no-opt(-n), --cli] {
|
||||
def 'main all' [ --no-opt(-n), --cli, --node ] {
|
||||
if ($no_opt) {
|
||||
if ($cli) {
|
||||
if ($node) {
|
||||
$targets | each { main $in.ident -n --node }
|
||||
} else if ($cli) {
|
||||
$targets | each { main $in.ident -n --cli }
|
||||
} else {
|
||||
$targets | each { main $in.ident -n }
|
||||
}
|
||||
} else {
|
||||
if ($cli) {
|
||||
if ($node) {
|
||||
$targets | each { main $in.ident --node }
|
||||
} else if ($cli) {
|
||||
$targets | each { main $in.ident --cli }
|
||||
} else {
|
||||
$targets | each { main $in.ident }
|
||||
@@ -86,6 +90,7 @@ def main [
|
||||
target: string, # Language, e.g.: py, ts, rust
|
||||
--no-opt(-n), # Compile in debug mode for dev
|
||||
--cli # Compile and place binaries in cli.
|
||||
--node
|
||||
] {
|
||||
let t = $targets | where ident == $target;
|
||||
|
||||
@@ -97,7 +102,10 @@ def main [
|
||||
mut profile = "";
|
||||
mut tar = "";
|
||||
|
||||
if ($cli) {
|
||||
if ($node) {
|
||||
$env.OUT_DIR = $"node-pkg-($t.ident)"
|
||||
$tar = "nodejs"
|
||||
} else if ($cli) {
|
||||
$env.OUT_DIR = $"../../../cli/wasm/($t.ident)"
|
||||
$tar = "deno"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user