Skip to content

Commit b63667d

Browse files
committed
Add install scripts for *nix and win32
1 parent d7a56a0 commit b63667d

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
dist/
2+
dotnet/
23
obj/
34
bin/
45
.vs/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -JSonFile src/global.json -InstallDir ./dotnet -NoPath"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --jsonfile ./src/global.json --install-dir ./dotnet --no-path

frameworks/keyed/blazor-wasm/package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
"customURL": "/dist/wwwroot/"
88
},
99
"scripts": {
10-
"build-dev": "dotnet build .\\src\\ -c Debug",
11-
"build-prod": "dotnet publish .\\src\\ -c Release -o .\\dist"
10+
"postinstall": "run-script-os",
11+
"postinstall:win32": "dotnet-install.cmd",
12+
"postinstall:nix": "./dotnet-install.sh",
13+
"build-dev": "run-script-os",
14+
"build-dev:win32": "cross-env DOTNET_CLI_TELEMETRY_OPTOUT=0 ./dotnet/dotnet.exe build ./src/ -c Debug",
15+
"build-dev:nix": "cross-env DOTNET_CLI_TELEMETRY_OPTOUT=0 ./dotnet/dotnet build ./src/ -c Debug",
16+
"build-prod": "run-script-os",
17+
"build-prod:win32": "cross-env DOTNET_CLI_TELEMETRY_OPTOUT=0 ./dotnet/dotnet.exe publish ./src/ -c Release -o ./dist",
18+
"build-prod:nix": "cross-env DOTNET_CLI_TELEMETRY_OPTOUT=0 ./dotnet/dotnet publish ./src/ -c Release -o ./dist"
1219
},
1320
"keywords": [
1421
"blazor",
@@ -21,5 +28,9 @@
2128
"type": "git",
2229
"url": "https://github.com/krausest/js-framework-benchmark.git"
2330
},
24-
"dependencies": {}
31+
"dependencies": {},
32+
"devDependencies": {
33+
"cross-env": "^7.0.2",
34+
"run-script-os": "1.1.1"
35+
}
2536
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "3.1.201"
4+
}
5+
}

0 commit comments

Comments
 (0)