Use nx for running dev tasks (#32476)

* Use nx for running dev tasks

Initially only build & start
This enables caching, i.e. if you made no changes to shared-components then it can skip that build and speed up your iteration cycle time

nx will also be used for our release tooling down the line

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Drop `concurrently` - we no longer use it

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Make knip happier

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Also use nx tasks for jest & tsc

so that SC gets built as needed

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add missing @nx/jest plugin

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix prebuild:rethemendex for Windows

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix prebuild:rethemendex for Windows

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add prepack script to package.json

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2026-02-12 15:19:59 +00:00
committed by GitHub
parent 7eff3f6c68
commit f326814895
9 changed files with 937 additions and 148 deletions
+2 -1
View File
@@ -41,7 +41,8 @@
"test:unit": "vitest --project=unit",
"test:storybook": "pnpm build:doc && vitest --project=storybook",
"test:storybook:update": "playwright-screenshots --entrypoint /work/scripts/storybook-screenshot-update.sh --with-node-modules",
"prepare": "vite build",
"build": "vite build",
"prepack": "pnpm run build",
"storybook": "storybook dev -p 6007",
"build:storybook": "pnpm build:doc && storybook build && node scripts/storybook-build-i18n.ts",
"build:doc": "typedoc",
+18
View File
@@ -0,0 +1,18 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {
"cache": true,
"command": "vite build",
"inputs": ["{projectRoot}/src/**/*"],
"outputs": ["{projectRoot}/dist"],
"options": { "cwd": "packages/shared-components" }
},
"start": {
"command": "vite build --watch",
"options": { "cwd": "packages/shared-components" },
"continuous": true
}
}
}