Skip to content

Commit 10b7298

Browse files
committed
some improvements to the docs
1 parent 3523dc0 commit 10b7298

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/using-nx-to-build-projects.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,34 @@ Please note: the Nx implementation is a work in progress. Not all apps support N
1111
```bash
1212
# Build a project
1313
npx nx build cli
14-
npx nx build @bitwarden/common
14+
npx nx build state # Modern libs and apps have simple, all lowercase target names
15+
npx nx build @bitwarden/common # Legacy libs have a special naming convention and include the @bitwarden prefix
1516

1617
# Test a project
1718
npx nx test cli
18-
npx nx test @bitwarden/common
1919

2020
# Lint a project
2121
npx nx lint cli
22-
npx nx lint @bitwarden/common
2322

24-
# Serve/watch a project (for apps with serve targets)
23+
# Serve/watch a project (for projects with serve targets)
2524
npx nx serve cli
2625

26+
# Build all projects that differ from origin/main
27+
nx affected --target=build --base=origin/main
28+
29+
# Build, lint, and test every project at once
30+
npx nx run-many --target=build,test,lint --all
2731

2832
# Most projects default to the "oss-dev" build, so if you need the bitwarden license build add a --configuration
2933
npx nx build cli --configuration=bit-dev
3034

3135
# If you need a production build drop the "dev" suffix
3236
npx nx build cli --configuration=oss # or "bit"
3337

38+
# Configurations can also be passed to run-many
39+
# For example: to run all Bitwarden licensed builds
40+
npx nx run-many --target=build,test,lint --all --configuration=bit
41+
3442
# Outputs are distrubuted in a root level /dist/ folder
3543

3644
# Run a locally built CLI

0 commit comments

Comments
 (0)