Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: split docker template #4809

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"fast-deep-equal": "^3.1.3",
"immer": "^10.1.1",
"immerhin": "^0.10.0",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"lexical": "^0.21.0",
"match-sorter": "^8.0.0",
"mdast-util-from-markdown": "^2.0.2",
Expand Down
14 changes: 7 additions & 7 deletions fixtures/react-router-docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"cli": "NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio",
"fixtures:link": "pnpm cli link --link https://p-d845c167-ea07-4875-b08d-83e97c09dcce-dot-${BUILDER_HOST:-main.development.webstudio.is}'?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93'",
"fixtures:sync": "pnpm cli sync --buildId f565d527-32e7-4731-bc71-aca9e9574587 && pnpm prettier --write ./.webstudio/",
"fixtures:build": "pnpm cli build --template react-router-docker --template .template && pnpm prettier --write ./app/ ./package.json ./tsconfig.json"
"fixtures:build": "pnpm cli build --template docker --template .template && pnpm prettier --write ./app/ ./package.json ./tsconfig.json"
},
"dependencies": {
"@react-router/dev": "^7.1.3",
"@react-router/fs-routes": "^7.1.3",
"@react-router/node": "^7.1.3",
"@react-router/serve": "^7.1.3",
"@react-router/dev": "^7.1.4",
"@react-router/fs-routes": "^7.1.4",
"@react-router/node": "^7.1.4",
"@react-router/serve": "^7.1.4",
"@webstudio-is/image": "workspace:*",
"@webstudio-is/react-sdk": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
Expand All @@ -23,10 +23,10 @@
"@webstudio-is/sdk-components-react-router": "workspace:*",
"h3": "^1.14.0",
"ipx": "^3.0.1",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.1.3",
"react-router": "^7.1.4",
"vite": "^5.4.11",
"webstudio": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ssg-netlify-by-project-id/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"vike": "^0.4.219"
"vike": "^0.4.220"
}
}
2 changes: 1 addition & 1 deletion fixtures/ssg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"vike": "^0.4.219"
"vike": "^0.4.220"
}
}
2 changes: 1 addition & 1 deletion fixtures/webstudio-cloudflare-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@webstudio-is/sdk-components-react": "workspace:*",
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"webstudio": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion fixtures/webstudio-custom-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@webstudio-is/sdk-components-react": "workspace:*",
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"web-vitals": "^3.5.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webstudio-is/sdk-components-react": "workspace:*",
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318"
},
Expand Down
2 changes: 1 addition & 1 deletion fixtures/webstudio-remix-netlify-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@webstudio-is/sdk-components-react": "workspace:*",
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318"
},
Expand Down
2 changes: 1 addition & 1 deletion fixtures/webstudio-remix-vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@webstudio-is/sdk-components-react": "workspace:*",
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-remix": "workspace:*",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"devDependencies": {
"@netlify/remix-adapter": "^2.5.1",
"@netlify/remix-edge-adapter": "3.4.2",
"@react-router/dev": "^7.1.3",
"@react-router/fs-routes": "^7.1.3",
"@react-router/dev": "^7.1.4",
"@react-router/fs-routes": "^7.1.4",
"@remix-run/cloudflare": "^2.15.2",
"@remix-run/cloudflare-pages": "^2.15.2",
"@remix-run/dev": "^2.15.2",
Expand All @@ -77,9 +77,9 @@
"prettier": "3.4.2",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.1.3",
"react-router": "^7.1.4",
"ts-expect": "^1.3.0",
"vike": "^0.4.219",
"vike": "^0.4.220",
"vite": "^5.4.11",
"vitest": "^3.0.2",
"wrangler": "^3.63.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const PROJECT_TEMPLATES = [
{
value: "docker" as const,
label: "Docker",
expand: ["react-router-docker"],
expand: ["react-router", "react-router-docker"],
},
{
value: "vercel" as const,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/prebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export const prebuild = async (options: {
let framework;
if (options.template.includes("ssg")) {
framework = await createVikeSsgFramework();
} else if (options.template.includes("react-router-docker")) {
} else if (options.template.includes("react-router")) {
framework = await createReactRouterFramework();
} else {
framework = await createRemixFramework();
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/defaults/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@webstudio-is/sdk-components-animation": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react-radix": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react-remix": "0.0.0-webstudio-version",
"isbot": "^5.1.21",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318"
},
Expand Down
36 changes: 2 additions & 34 deletions packages/cli/templates/react-router-docker/package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,7 @@
{
"type": "module",
"private": true,
"sideEffects": false,
"scripts": {
"build": "react-router build",
"dev": "react-router dev",
"start": "react-router-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@react-router/dev": "^7.1.3",
"@react-router/fs-routes": "^7.1.3",
"@react-router/node": "^7.1.3",
"@react-router/serve": "^7.1.3",
"@webstudio-is/image": "0.0.0-webstudio-version",
"@webstudio-is/react-sdk": "0.0.0-webstudio-version",
"@webstudio-is/sdk": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-animation": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react-radix": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react-router": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react": "0.0.0-webstudio-version",
"@react-router/node": "^7.1.4",
"h3": "^1.14.0",
"ipx": "^3.0.1",
"isbot": "^5.1.21",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.1.3",
"vite": "^5.4.11"
},
"devDependencies": {
"@types/react": "^18.2.70",
"@types/react-dom": "^18.2.25",
"typescript": "5.7.3"
},
"engines": {
"node": ">=20.0.0"
"ipx": "^3.0.1"
}
}
36 changes: 36 additions & 0 deletions packages/cli/templates/react-router/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "module",
"private": true,
"sideEffects": false,
"scripts": {
"build": "react-router build",
"dev": "react-router dev",
"start": "react-router-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@react-router/dev": "^7.1.4",
"@react-router/fs-routes": "^7.1.4",
"@react-router/serve": "^7.1.4",
"@webstudio-is/image": "0.0.0-webstudio-version",
"@webstudio-is/react-sdk": "0.0.0-webstudio-version",
"@webstudio-is/sdk": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-animation": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react-radix": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react-router": "0.0.0-webstudio-version",
"@webstudio-is/sdk-components-react": "0.0.0-webstudio-version",
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.1.4",
"vite": "^5.4.11"
},
"devDependencies": {
"@types/react": "^18.2.70",
"@types/react-dom": "^18.2.25",
"typescript": "5.7.3"
},
"engines": {
"node": ">=20.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/cli/templates/ssg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@webstudio-is/sdk-components-react-radix": "0.0.0-webstudio-version",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"vike": "^0.4.219"
"vike": "^0.4.220"
},
"devDependencies": {
"@types/react": "^18.2.70",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-components-react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@webstudio-is/react-sdk": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
"@webstudio-is/sdk-components-react": "workspace:*",
"react-router": "^7.1.3"
"react-router": "^7.1.4"
},
"devDependencies": {
"@types/react": "^18.2.70",
Expand Down
Loading