Skip to content

Commit

Permalink
rev script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
OlofBlomqvist committed May 21, 2024
1 parent 1ad9c67 commit 7c495d9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build_npm_packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if($skipBuild -ne $true) {
Remove-Item $latest_dir/ -Recurse -Force -ErrorAction Stop
}
# Build for NodeJS
/home/olof/.cargo/bin/wasm-pack build --all-features --release --target nodejs --out-dir $nodejs_dir/pkg
wasm-pack build --all-features --release --target nodejs --out-dir $nodejs_dir/pkg
$j = Get-Content $nodejs_dir/pkg/package.json |convertfrom-json
if($null -ne $version -and $version.Length -gt 1) {
$j.version = $version + "-nodejs"
Expand All @@ -42,7 +42,7 @@ if($skipBuild -ne $true) {


# Build for Web
/home/olof/.cargo/bin/wasm-pack build --all-features --release --target web --out-dir $web_dir/pkg
wasm-pack build --all-features --release --target web --out-dir $web_dir/pkg
$j = Get-Content $web_dir/pkg/package.json |convertfrom-json
if($null -ne $version -and $version.Length -gt 0) {
$j.version = $version + "-web"
Expand All @@ -62,7 +62,7 @@ if($skipBuild -ne $true) {
#wasm-pack pack $web_dir

# Build bundle
/home/olof/.cargo/bin/wasm-pack build --all-features --release --target bundler --out-dir $bundle_dir/pkg
wasm-pack build --all-features --release --target bundler --out-dir $bundle_dir/pkg
$j = Get-Content $bundle_dir/pkg/package.json |convertfrom-json
if($null -ne $version -and $version.Length -gt 0) {
$j.version = $version + "-bundle"
Expand All @@ -75,7 +75,7 @@ if($skipBuild -ne $true) {
#wasm-pack pack $bundle_dir

# Build latest
/home/olof/.cargo/bin/wasm-pack build --all-features --release --target nodejs --out-dir $latest_dir/pkg
wasm-pack build --all-features --release --target nodejs --out-dir $latest_dir/pkg
$j = Get-Content $latest_dir/pkg/package.json |convertfrom-json
if($null -ne $version -and $version.Length -gt 0) {
$j.version = $version
Expand All @@ -98,14 +98,14 @@ if($skipBuild -ne $true) {

if($publish) {
write-host -ForegroundColor Green "Publishing web... $web_dir $webv"
/home/olof/.cargo/bin/wasm-pack publish -t web --tag web $web_dir
wasm-pack publish -t web --tag web $web_dir
write-host -ForegroundColor Green "Publishing nodejs... $nodejs_dir $njsv"
/home/olof/.cargo/bin/wasm-pack publish -t nodejs --tag nodejs $nodejs_dir
wasm-pack publish -t nodejs --tag nodejs $nodejs_dir
write-host -ForegroundColor Green "Publishing bundle... $bundle_dir $bundlev"
/home/olof/.cargo/bin/wasm-pack publish -t bundler --tag bundle $bundle_dir
wasm-pack publish -t bundler --tag bundle $bundle_dir
if($publishLatestTag) {
write-host -ForegroundColor Green "Publishing latest... $latest_dir $latestlev"
/home/olof/.cargo/bin/wasm-pack publish -t nodejs --tag latest $latest_dir
wasm-pack publish -t nodejs --tag latest $latest_dir

}
}

0 comments on commit 7c495d9

Please sign in to comment.