Skip to content

Commit

Permalink
Fix build (#4)
Browse files Browse the repository at this point in the history
* Add installing dependencies as part of build
  • Loading branch information
kant2002 authored Jun 28, 2024
1 parent 63d18eb commit 9b0479f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Generate code
run: |
./build.sh
./generate-csharp.sh
- name: Build
run: dotnet build
6 changes: 3 additions & 3 deletions Blazor.InteropGenerator.JS/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
},
"homepage": "https://github.com/kant2002/blazor-webidl-gen#readme",
"dependencies": {
"webidl2": "24.2.2"
"webidl2": "14.0.1"
},
"devDependencies": {
"@types/node": "^10.11.1",
"@types/webidl2": "23.13.6",
"typescript": "4.7.4"
"@types/webidl2": "10.2.2",
"typescript": "3.1.1"
}
}
14 changes: 12 additions & 2 deletions blazor-webidl-gen.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
# Visual Studio Version 17
VisualStudioVersion = 17.11.34929.205
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorInteropGenerator", "BlazorInteropGenerator\BlazorInteropGenerator.csproj", "{7A95D1D3-974B-4547-8405-658EE9F77F29}"
EndProject
Expand All @@ -21,6 +21,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.WebApiInterop.Sample
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.InteropGenerator.JS", "Blazor.InteropGenerator.JS\Blazor.InteropGenerator.JS.csproj", "{9437900C-963E-41D8-9CD0-6BAB93E2246C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{85725ED8-C969-481E-A2F0-081F7C0F8130}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{F37C0D8A-C4AB-483D-BFA1-07DDFF50F0FC}"
ProjectSection(SolutionItems) = preProject
build.yml = build.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -95,6 +102,9 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F37C0D8A-C4AB-483D-BFA1-07DDFF50F0FC} = {85725ED8-C969-481E-A2F0-081F7C0F8130}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB7C067C-A30D-485C-A989-3F0D08E8E962}
EndGlobalSection
Expand Down
1 change: 1 addition & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set js_location=../Blazor.WebApiInterop/wwwroot
if not exist "%json_dir%" mkdir "%json_dir%"
if not exist "%js_location%" mkdir "%js_location%"

cmd /c npm install
cmd /c npm run compile
cmd /c npm run process -- "%idl_location%/Vibration.widl" "%json_dir%/Vibration.json" "%js_location%/Vibration.js"
cmd /c npm run process -- "%idl_location%/Storage.widl" "%json_dir%/Storage.json" "%js_location%/Storage.js"
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

cd Blazor.InteropGenerator.JS
json_dir=../json
git submodule update --init
idl_location=../generator/inputfiles/idl
mkdir -p $json_dir

npm install
npm run compile
npm run process -- "$idl_location/Vibration.widl" "$json_dir/Vibration.json"
npm run process -- "$idl_location/Storage.widl" "$json_dir/Storage.json"
Expand Down
10 changes: 5 additions & 5 deletions generate-csharp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n Blazor
dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Notifications.json" -o $outputpath/Notifications.cs

# 7 compilation errors
dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Performance Timeline.json" -o $outputpath/PerformanceTimeline.cs
#dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Performance Timeline.json" -o $outputpath/PerformanceTimeline.cs

# These files produce exceptions
dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Push.json" -o $outputpath/Push.cs
dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Indexed Database.json" -o $outputpath/IndexedDatabase.cs
dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Navigation Timing.json" -o $outputpath/NavigationTiming.cs
dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Service Workers.json" -o $outputpath/ServiceWorkers.cs
#dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Push.json" -o $outputpath/Push.cs
#dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Indexed Database.json" -o $outputpath/IndexedDatabase.cs
#dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Navigation Timing.json" -o $outputpath/NavigationTiming.cs
#dotnet run --no-build --no-launch-profile -p BlazorInteropGenerator -- -n BlazorExtensions -s "json/Service Workers.json" -o $outputpath/ServiceWorkers.cs

echo Completed!

0 comments on commit 9b0479f

Please sign in to comment.