Skip to content

Commit 60e80c1

Browse files
authored
chore: cleanup root npm script aliases and obsolete code (#32286)
1 parent fee6435 commit 60e80c1

File tree

7 files changed

+29
-313
lines changed

7 files changed

+29
-313
lines changed

azure-pipelines.perf-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,18 @@ jobs:
8787
uniqueId: 'perfComment9424'
8888

8989
- script: |
90-
yarn northstar:stats:build
90+
yarn gulp stats
9191
condition: eq(variables.isPR, false)
9292
displayName: Bundle Statistics (master only)
9393
9494
- script: |
95-
yarn northstar:perf
95+
yarn nx run perf:test-perf
9696
condition: eq(variables.isPR, false)
9797
displayName: Performance Tests (master only)
9898
9999
# HEADS UP: also see tag-version-prefix in fluentui-publish.js
100100
- script: |
101-
yarn northstar:stats:save --tag=`git tag --points-at HEAD | grep ^@fluentui/react-northstar_v | grep -o 'northstar_v.*'`
101+
yarn gulp stats:save --tag=`git tag --points-at HEAD | grep ^@fluentui/react-northstar_v | grep -o 'northstar_v.*'`
102102
condition: eq(variables.isPR, false)
103103
displayName: Save Statistics to DB (master only)
104104
env:

azure-pipelines.release-fluentui.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ extends:
156156
inputs:
157157
script: |
158158
echo deployBasePath $(deployBasePath) docsiteVersion $(docsiteVersion)
159-
NODE_ENV=production yarn northstar:build:docs
159+
NODE_ENV=production yarn nx run docs:bundle
160160
161161
- task: AzureCLI@2
162162
displayName: Upload to Azure

docs/react-v9/contributing/command-cheat-sheet.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,22 @@ Primary source of our generators lives in [workspace-plugin](../../../tools//wor
9191
yarn # installs everything. It fixes many things.
9292
yarn run dedupe # dedupes dependencies - necessary to run after any kind of package bump/changes
9393

94+
# run tasks
95+
yarn start # our custom nx-console CLI alternative to guide you through monorepo
96+
9497
# generators
95-
yarn create-package # scaffolds a new package
96-
yarn create-component # scaffolds a new component
98+
yarn nx list @fluentui/workspace-plugin # prints all available workspace generators
99+
yarn nx g @fluentui/workspace-plugin:<generator-name> # run <generator-name> from workspace plugin
100+
yarn create-package # scaffolds a new package. alias for `nx g @fluentui/workspace-plugin:react-library`
101+
yarn create-component # scaffolds a new component. alias for `nx g @fluentui/workspace-plugin:react-component`
102+
97103
yarn change # creates a new change file, if needed
98104

99-
# NOTE: following tasks will be executed against all monorepo projects ( avoid = SLOW )
105+
# 💡 NOTE: following tasks will be executed against all monorepo projects ( avoid = SLOW )
100106
yarn clean # tidies any cached dependencies in all packages
101-
yarn build # generates and relinks all packages and temporary files, this can be a good option if you see errors unrelated to the packages you are working on
102-
yarn start # runs a package. You can select the package of choice.
103-
yarn update-snapshots # updates snapshot tests in whole monorepo
107+
yarn nx run-many -t <target-name> # runs <target-name> on all monorepo projects
108+
yarn nx run-many -t build # triggers build target(task) on all monorepo projects, this can be a good option if you see errors unrelated to the packages you are working on
109+
104110

105111
# running project tasks
106112
yarn nx run <project-name>:<target-name> # runs tasks within a package. [More help here](https://nx.dev/features/run-tasks#running-tasks)
@@ -111,6 +117,8 @@ yarn nx run <project-name>:type-check # quickly runs type checks and associated
111117
yarn nx run react:build # build v8 so intellisense works.
112118
```
113119

120+
![running project tasks](https://github.com/user-attachments/assets/89d3295a-ceeb-43a7-b2d5-f913003e17ab)
121+
114122
```shell
115123
git checkout user/jdoe/some-fancy-branch-name # checks out an existing branch
116124
git checkout -b user/jdoe/some-fancy-branch-name # creates a branch initially

package.json

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,24 @@
1212
},
1313
"scripts": {
1414
"dedupe": "npx yarn-deduplicate --strategy fewer",
15-
"build": "nx run-many -t build --nxBail --verbose",
16-
"buildci": "nx affected -t build test lint type-check test-ssr test-integration verify-packaging --nxBail --verbose",
17-
"buildto": "nx build --nxBail",
1815
"change": "beachball change --no-commit",
1916
"check:change": "beachball check",
2017
"check:modified-files": "node -r ./scripts/ts-node/src/register ./scripts/executors/src/check-for-modified-files",
2118
"check:affected": "node ./scripts/executors/src/checkIfPackagesAffected.js",
2219
"check:installed-dependencies-versions": "satisfied --no-peers --skip-invalid",
23-
"clean": "nx run-many -t clean --verbose",
24-
"code-style": "nx run-many -t code-style --verbose",
25-
"codepen": "cd packages/react && node ../../scripts/executors/src/local-codepen.js",
26-
"copy-notices": "node scripts/generators/src/copy-notices.js",
2720
"create-component": "yarn nx g @fluentui/workspace-plugin:react-component",
2821
"create-package": "yarn nx g @fluentui/workspace-plugin:react-library",
29-
"e2e": "nx run-many -t e2e --verbose --parallel=1",
3022
"format": "node scripts/executors/src/format.js",
3123
"generate-version-files": "node -r ./scripts/ts-node/src/register ./scripts/generators/src/generate-version-files",
32-
"lint": "nx run-many -t lint --verbose",
33-
"lint:log": "FORCE_COLOR=0 yarn lint > lint.log 2>&1",
3424
"postinstall": "node ./scripts/package-manager/src/postinstall.js",
3525
"preinstall": "node ./scripts/package-manager/src/preinstall.js",
3626
"publish:beachball": "beachball publish -b origin/master --access public -y",
37-
"rebuild": "node ./scripts/executors/src/invalidate-just-cache.js && yarn build --reset-cache",
38-
"northstar:release": "northstar-release",
39-
"northstar:build:docs": "yarn nx run docs:bundle",
40-
"northstar:start": "yarn workspace @fluentui/docs start",
41-
"northstar:perf": "yarn nx run perf:test-perf",
42-
"northstar:stats:build": "gulp stats",
43-
"northstar:stats:save": "gulp stats:save",
44-
"northstar:test:circulars": "gulp test:circulars:run",
45-
"rename-package": "node -r ./scripts/ts-node/src/register ./scripts/generators/src/rename-package.ts",
46-
"scrub": "node ./scripts/executors/src/scrub.js",
4727
"start": "node -r ./scripts/ts-node/src/register ./scripts/executors/src/start",
48-
"test": "nx run-many -t test --verbose",
49-
"update-snapshots": "nx run-many -t update-snapshots --verbose"
28+
"//": "↓↓↓ DEPRECATED ↓↓↓ - WILL BE REMOVED IN THE FUTURE",
29+
"prebuildto": "echo '⚠️ NOTE ⚠️:\nThis command is deprecated and will be removed.\nUse nx run <project>:<target> instead'",
30+
"buildto": "nx build --nxBail",
31+
"clean": "nx run-many -t clean --verbose",
32+
"scrub": "node ./scripts/executors/src/scrub.js"
5033
},
5134
"devDependencies": {
5235
"@actions/core": "1.9.1",

packages/fluentui/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ To contribute to packages in this folder, follow [these setup instructions](setu
3535
From repo root:
3636

3737
```sh
38-
yarn northstar:start # start doc site: choose `@fluentui/docs`
38+
yarn start # start doc site: choose `docs`
3939

4040
yarn test # run all packages' tests once
4141

42-
yarn build # build all packages
43-
yarn northstar:build:docs # build docs
42+
yarn nx run-many -t build -p tag:react-northstar # build all northstar packages
43+
yarn nx run docs:bundle # build docs
4444

45-
yarn lint # lint all packages
45+
yarn nx run-many -t lint -p tag:react-northstar # lint all packages
4646

4747
yarn format # run prettier on changed files
4848
```

packages/fluentui/test-a-feature.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ Finding the right number of `iterations` is a balancing act between having a fas
280280
Run test and watch:
281281

282282
```
283-
yarn northstar:perf
283+
yarn nx run perf:test-perf
284284
```
285285

286-
After running `northstar:perf`, results can be viewed in the `packages/fluentui/perf-test-northstar/dist` folder with the main entry file being `packages/fluentui/perf-test-northstar/dist/perfCounts.html`.
286+
After running `yarn nx run perf:test-perf`, results can be viewed in the `packages/fluentui/perf-test-northstar/dist` folder with the main entry file being `packages/fluentui/perf-test-northstar/dist/perfCounts.html`.
287287

288288
There are more detailed commands as well (these must be run from `packages/fluentui/perf-test-northstar` directory):
289289

0 commit comments

Comments
 (0)