Skip to content

Commit

Permalink
Clean up verbiage on build scripts (#31262)
Browse files Browse the repository at this point in the history
* Clean up verbiage on build scripts

* Update docs/BuildFromSource.md

Co-authored-by: Kevin Pilch <[email protected]>

Co-authored-by: Kevin Pilch <[email protected]>
  • Loading branch information
captainsafia and Pilchie authored Mar 26, 2021
1 parent 6299f52 commit 70e7c40
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions docs/BuildFromSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ code .

When developing in VS Code, you'll need to use the `build.cmd` or `build.sh` scripts in order to build the project. You can learn more about the command line options available, check out [the section below](using-dotnet-on-command-line-in-this-repo).

> :warning: Most of the time, you will want to build a particular project instead of the entire repository. It's faster and will allow you to focus on a particular area of concern. If you need to build all code in the repo for any reason, you can use the top-level build script located under `eng\build.cmd` or `eng\build.sh`.
The source code in this repo is divided into directories for each project area. Each directory will typically contain a `src` directory that contains the source files for a project and a `test` directory that contains the test projects and assets within a project.

Some projects, like the `Components` project or the `Razor` project, might contain additional subdirectories.
Expand All @@ -242,6 +244,8 @@ On macOS/Linux, you can run the shell script:
./build.sh
```

> :bulb: Before using the `build.cmd` or `build.sh` at the top-level or in a subfolder, you will need to make sure that [the dependencies documented above](#step-2-install-pre-requisites) have been installed.
By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify `-noBuildNodeJS` or `--no-build-nodejs` on the command line.

## Step 4: Make your code changes
Expand Down Expand Up @@ -288,24 +292,6 @@ On macOS/Linux:

> :bulb: If you're working on changes for a particular subset of the project, you might not want to execute the entire test suite. Instead, only run the tests within the subdirectory where changes were made. This can be accomplished by passing the `projects` property like so: `.\build.cmd -test -projects .\src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj`.
### Building a subset of the code

When working in the repository, you'll typically be focused on one project area, such as Blazor and SignalR. In that case, it's easier to use the `build.cmd` and `build.sh` that are available in each subfolder. When invoked in a subfolder on Windows:

```ps1
.\build.cmd
```

Or on macOS or Linux:

```bash
./build.sh
```

> :bulb: Before using the `build.cmd` or `build.sh` at the top-level or in a subfolder, you will need to make sure that [the dependencies documented above](#step-2-install-pre-requisites) have been installed.
These scripts will build and test the projects within a specific directory. Furthermore, you can use flags on `build.cmd`/`.sh` to build subsets based on language type, like C++, TypeScript, or C#. Run `build.sh --help` or `build.cmd -help` for details.

### Build properties

Additional properties can be added as an argument in the form `/property:$name=$value`, or `/p:$name=$value` for short. For example:
Expand Down

0 comments on commit 70e7c40

Please sign in to comment.