You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Components/README.md
+39-26Lines changed: 39 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,42 +29,56 @@ The following contains a description of each sub-directory in the `Components` d
29
29
30
30
## Development Setup
31
31
32
-
### Build
32
+
**Note**: To build other specific projects from source, follow the instructions [on building the project](../../docs/BuildFromSource.md#step-3-build-the-repo).
33
33
34
-
To build this specific project from source, follow the instructions [on building the project](../../docs/BuildFromSource.md#step-3-build-the-repo).
34
+
### Building ASP.NET Core Components
35
35
36
-
**Note:** You also need to run the preceding `build` command in the command line before building in VS to ensure that the Web.JS dependency is built.
36
+
1. You'll need to install [Node](https://nodejs.org) on your machine.
37
37
38
-
### A Guide to build Web.JS
38
+
1. Ensure the repository is clean from any asset that could remain from previous version of the repository. This is recommended when switching branches, or after updating the working branch.
39
39
40
-
Prior to building `src\Components\Web.JS\`
40
+
```powershell
41
+
git clean -xdff
42
+
```
41
43
42
-
1. You'll need to install [Node](https://nodejs.org) on your machine.
44
+
You may need to kill some processes holding on files that are being deleted, like closing Visual Studio and other `msbuild` or `dotnet` processes. There may also be lingering headless `chrome` processes, but they are not included in this command. The following command may help you but be aware that this could also stop other important tasks:
2. You'll need to run the `restore` script locally to install the required dotnet dependencies and setup the repo. The `restore` script is located in the root of the repo.
50
+
1. Use NPM to restore the required JavaScript modules. This doesn't require an Internet connection since the sources are read from a sub-module.
51
+
52
+
```powershell
53
+
npm ci --offline
54
+
```
55
+
56
+
1. You'll need to run the `restore` script locally to install the required dotnet dependencies and setup the repo. The `restore` script is located in the root of the repo.
45
57
46
58
```bash
47
59
./restore.sh
48
60
```
49
61
50
62
```powershell
51
-
./restore.ps1
63
+
./restore.cmd
52
64
```
53
65
54
-
3. After the restore script has finished executing, activate the locally installed .NET by running the following command.
66
+
1. Now you can build all the JavaScript assets required by the repository (including SignalR for instance) by running the following command:
55
67
56
-
```bash
57
-
source activate.sh
68
+
```powershell
69
+
npm run build
58
70
```
59
71
72
+
1. Build the Components:
73
+
60
74
```powershell
61
-
. ./activate.ps1
75
+
./src/Components/build.cmd
62
76
```
63
77
64
-
4. Now you can build `src\Components\Web.JS\` by running the following commands in the `src\Components\Web.JS` directory:
78
+
2. Optionally, open the Componentsin Visual Studio:
65
79
66
80
```powershell
67
-
dotnet build
81
+
./src/Components/startvs.cmd
68
82
```
69
83
70
84
### Test
@@ -84,23 +98,22 @@ These tests are run in the CI as part of the [`aspnetcore-components-e2e`](https
84
98
85
99
#### How to run the E2E Tests
86
100
87
-
To run the tests for this project, follow these steps (from the root directory):
101
+
The E2E tests can be run and debugged directly from Visual Studio (as explained in the previous section). To run the tests from the command line,
102
+
follow the previous build steps and then these commands:
88
103
89
-
##### Windows
104
+
1. Activate the locally installed .NET by running the following command.
0 commit comments