Skip to content

Commit cafeda9

Browse files
authored
chore(repo): make pnpm dev:sandbox work from any directory (#8259)
1 parent 4e3cb0a commit cafeda9

File tree

8 files changed

+11
-7
lines changed

8 files changed

+11
-7
lines changed

.changeset/dev-sandbox-anywhere.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dev": "TURBO_UI=0 FORCE_COLOR=1 turbo dev --filter=@clerk/* --filter=!@clerk/expo --filter=!@clerk/tanstack-react-start --filter=!@clerk/chrome-extension",
1414
"dev:fe-libs": "TURBO_UI=0 FORCE_COLOR=1 turbo dev --filter=@clerk/clerk-js --filter=@clerk/ui",
1515
"dev:js": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:current --filter=@clerk/clerk-js",
16-
"dev:sandbox": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:sandbox",
16+
"dev:sandbox": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:sandbox:serve",
1717
"format": "turbo format && node scripts/format-non-workspace.mjs",
1818
"format:check": "turbo format:check && node scripts/format-non-workspace.mjs --check",
1919
"preinstall": "npx only-allow pnpm",

packages/clerk-js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
"clean": "rimraf ./dist",
6868
"dev": "rspack serve --config rspack.config.js",
6969
"dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4000}",
70-
"dev:sandbox": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4000} --env sandbox=1",
70+
"dev:sandbox": "pnpm -w dev:sandbox",
71+
"dev:sandbox:serve": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4000} --env sandbox=1",
7172
"format": "node ../../scripts/format-package.mjs",
7273
"format:check": "node ../../scripts/format-package.mjs --check",
7374
"lint": "eslint src",

packages/clerk-js/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineConfig({
4747

4848
/* Run your local dev server before starting the tests */
4949
webServer: {
50-
command: `PORT=${PORT} pnpm dev:sandbox`,
50+
command: `PORT=${PORT} pnpm dev:sandbox:serve`,
5151
url: `http://localhost:${PORT}`,
5252
reuseExistingServer: !process.env.CI,
5353
},

packages/clerk-js/sandbox/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This folder contains a sandbox environment for iterating on the Clerk UI compone
44

55
## Running the sandbox
66

7-
You can start the sandbox by running `pnpm dev:sandbox` **in the root of the `javascript` repo**. This will start the server on <a href="http://localhost:4000"><code>http://localhost:4000</code></a>. It will also run the development server for `@clerk/ui`.
7+
You can start the sandbox by running `pnpm dev:sandbox` from anywhere in the `javascript` repo. This will start the server on <a href="http://localhost:4000"><code>http://localhost:4000</code></a>. It will also run the development server for `@clerk/ui`.
88

99
## Setting component props
1010

packages/clerk-js/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"inputs": ["sandbox/**"],
2626
"outputs": ["dist/**"]
2727
},
28-
"dev:sandbox": {
28+
"dev:sandbox:serve": {
2929
"cache": false,
3030
"dependsOn": ["build"],
3131
"persistent": true

packages/ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
"clean": "rimraf ./dist",
8181
"dev": "rspack serve --config rspack.config.js",
8282
"dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4011}",
83-
"dev:sandbox": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:4011",
83+
"dev:sandbox": "pnpm -w dev:sandbox",
84+
"dev:sandbox:serve": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:4011",
8485
"format": "node ../../scripts/format-package.mjs",
8586
"format:check": "node ../../scripts/format-package.mjs --check",
8687
"lint:attw": "attw --pack . --exclude-entrypoints themes/shadcn.css --profile esm-only",

packages/ui/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": ["//"],
33
"tasks": {
4-
"dev:sandbox": {
4+
"dev:sandbox:serve": {
55
"cache": false,
66
"dependsOn": ["build"],
77
"persistent": true

0 commit comments

Comments
 (0)