diff --git a/.changeset/dev-sandbox-anywhere.md b/.changeset/dev-sandbox-anywhere.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/dev-sandbox-anywhere.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/package.json b/package.json index 2284a10e6f7..ed710fa49c9 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev": "TURBO_UI=0 FORCE_COLOR=1 turbo dev --filter=@clerk/* --filter=!@clerk/expo --filter=!@clerk/tanstack-react-start --filter=!@clerk/chrome-extension", "dev:fe-libs": "TURBO_UI=0 FORCE_COLOR=1 turbo dev --filter=@clerk/clerk-js --filter=@clerk/ui", "dev:js": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:current --filter=@clerk/clerk-js", - "dev:sandbox": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:sandbox", + "dev:sandbox": "TURBO_UI=0 FORCE_COLOR=1 turbo dev:sandbox:serve", "format": "turbo format && node scripts/format-non-workspace.mjs", "format:check": "turbo format:check && node scripts/format-non-workspace.mjs --check", "preinstall": "npx only-allow pnpm", diff --git a/packages/clerk-js/package.json b/packages/clerk-js/package.json index e36cf1a00e5..e444c753129 100644 --- a/packages/clerk-js/package.json +++ b/packages/clerk-js/package.json @@ -67,7 +67,8 @@ "clean": "rimraf ./dist", "dev": "rspack serve --config rspack.config.js", "dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4000}", - "dev:sandbox": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4000} --env sandbox=1", + "dev:sandbox": "pnpm -w dev:sandbox", + "dev:sandbox:serve": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4000} --env sandbox=1", "format": "node ../../scripts/format-package.mjs", "format:check": "node ../../scripts/format-package.mjs --check", "lint": "eslint src", diff --git a/packages/clerk-js/playwright.config.ts b/packages/clerk-js/playwright.config.ts index 95a5d15fa8e..477df9c7d9a 100644 --- a/packages/clerk-js/playwright.config.ts +++ b/packages/clerk-js/playwright.config.ts @@ -47,7 +47,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: `PORT=${PORT} pnpm dev:sandbox`, + command: `PORT=${PORT} pnpm dev:sandbox:serve`, url: `http://localhost:${PORT}`, reuseExistingServer: !process.env.CI, }, diff --git a/packages/clerk-js/sandbox/README.md b/packages/clerk-js/sandbox/README.md index 86c01790d09..3ec390f432c 100644 --- a/packages/clerk-js/sandbox/README.md +++ b/packages/clerk-js/sandbox/README.md @@ -4,7 +4,7 @@ This folder contains a sandbox environment for iterating on the Clerk UI compone ## Running the sandbox -You can start the sandbox by running `pnpm dev:sandbox` **in the root of the `javascript` repo**. This will start the server on http://localhost:4000. It will also run the development server for `@clerk/ui`. +You can start the sandbox by running `pnpm dev:sandbox` from anywhere in the `javascript` repo. This will start the server on http://localhost:4000. It will also run the development server for `@clerk/ui`. ## Setting component props diff --git a/packages/clerk-js/turbo.json b/packages/clerk-js/turbo.json index d0557a2bc8c..f4649e05292 100644 --- a/packages/clerk-js/turbo.json +++ b/packages/clerk-js/turbo.json @@ -25,7 +25,7 @@ "inputs": ["sandbox/**"], "outputs": ["dist/**"] }, - "dev:sandbox": { + "dev:sandbox:serve": { "cache": false, "dependsOn": ["build"], "persistent": true diff --git a/packages/ui/package.json b/packages/ui/package.json index 13ad575169d..058923dbc67 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -80,7 +80,8 @@ "clean": "rimraf ./dist", "dev": "rspack serve --config rspack.config.js", "dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4011}", - "dev:sandbox": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:4011", + "dev:sandbox": "pnpm -w dev:sandbox", + "dev:sandbox:serve": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:4011", "format": "node ../../scripts/format-package.mjs", "format:check": "node ../../scripts/format-package.mjs --check", "lint:attw": "attw --pack . --exclude-entrypoints themes/shadcn.css --profile esm-only", diff --git a/packages/ui/turbo.json b/packages/ui/turbo.json index 8b83ea8c3f2..9309d888fd3 100644 --- a/packages/ui/turbo.json +++ b/packages/ui/turbo.json @@ -1,7 +1,7 @@ { "extends": ["//"], "tasks": { - "dev:sandbox": { + "dev:sandbox:serve": { "cache": false, "dependsOn": ["build"], "persistent": true