Skip to content

Commit 71e71a6

Browse files
committed
Update README with package installation instruction
1 parent 6f790be commit 71e71a6

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Components/Pages/Home.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
<h1>Hello, world! 🚀</h1>
66

7-
Welcome to your new Blazor app with hot reload!
7+
Welcome to your new Blazor app with just refresh to see your changes!

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Link to the full guide - upcoming
2323
During development, the container uses `dotnet watch` to enable automatic reloads when files change. The development server is started with:
2424

2525
```sh
26-
dotnet watch --no-launch-profile
26+
dotnet watch --no-launch-profile --hot-reload --non-interactive
2727
```
2828

2929
This will:
@@ -32,6 +32,38 @@ This will:
3232
- Start the app on port 5054.
3333
- Enable automatic browser refresh when Razor components or CSS files change.
3434

35+
### Installing Packages
36+
37+
**Front-end libraries** (CSS/JS frameworks like Bootstrap, jQuery, etc.):
38+
39+
First, ensure .NET tools are restored:
40+
```sh
41+
dotnet tool restore
42+
```
43+
44+
Then install front-end libraries using LibMan:
45+
```sh
46+
dotnet tool run libman install <library>@<version> --provider cdnjs --destination wwwroot/lib/<library>
47+
```
48+
49+
For example:
50+
```sh
51+
dotnet tool run libman install bootstrap@5.3.0 --provider cdnjs --destination wwwroot/lib/bootstrap
52+
dotnet tool run libman install jquery@3.7.1 --provider cdnjs --destination wwwroot/lib/jquery
53+
```
54+
55+
**NuGet packages** (C# libraries and frameworks):
56+
```sh
57+
dotnet add package <PackageName>
58+
```
59+
For example:
60+
```sh
61+
dotnet add package Newtonsoft.Json
62+
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
63+
```
64+
65+
The `libman.json` file manages client-side libraries, while the `.csproj` file tracks NuGet dependencies. Both are automatically restored during development and build.
66+
3567
### Production
3668

3769
Builds a production-ready image. During the build, dependencies are restored with `dotnet restore` and the application is published with `dotnet publish`. When the container starts, it runs:

0 commit comments

Comments
 (0)