Skip to content

Commit 7c5b21b

Browse files
committed
Setup Libman for Boostrap
1 parent 5efbb1e commit 7c5b21b

5 files changed

Lines changed: 32 additions & 4 deletions

File tree

Components/App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
<script src="@Assets["_framework/blazor.web.js"]"></script>
2121
</body>
2222

23-
</html>
23+
</html>

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ COPY . /app
66

77
WORKDIR ${FOLDER}
88

9-
RUN dotnet publish component-blazor.csproj -c Release -o out
9+
RUN dotnet tool restore \
10+
&& dotnet tool run libman restore \
11+
&& dotnet publish component-blazor.csproj -c Release -o out
1012

1113
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
1214

@@ -20,4 +22,4 @@ EXPOSE 5054
2022

2123
ENV ASPNETCORE_URLS=http://+:5054
2224

23-
CMD ["dotnet", "component-blazor.dll"]
25+
CMD ["dotnet", "component-blazor.dll"]

Dockerfile.dev

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ WORKDIR $FOLDER
88

99
USER 1000:1000
1010

11+
RUN dotnet tool restore \
12+
&& dotnet tool run libman restore
13+
1114
EXPOSE 5054
1215

1316
ENV ASPNETCORE_URLS=http://+:5054
@@ -16,4 +19,4 @@ ENV ASPNETCORE_ENVIRONMENT=Development
1619

1720
ENV ASPNETCORE_HTTPS_PORT=""
1821

19-
CMD [ "dotnet", "watch", "--no-launch-profile"]
22+
CMD [ "dotnet", "watch", "--no-launch-profile"]

dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"microsoft.web.librarymanager.cli": {
6+
"version": "3.0.71",
7+
"commands": [
8+
"libman"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

libman.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "1.0",
3+
"defaultProvider": "unpkg",
4+
"libraries": [
5+
{
6+
"library": "bootstrap@5.3.3",
7+
"destination": "wwwroot/lib/bootstrap"
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)