Skip to content

Commit

Permalink
Update CodeSandbox config for Node 18 and new editor (#8292)
Browse files Browse the repository at this point in the history
* config: update config for codesandbox

* feat: update create-astro to remove .codesandbox folder

* chore: changeset

* fix: use node18
  • Loading branch information
Princesseuh authored Aug 30, 2023
1 parent 2a94614 commit 4e88ffd
Show file tree
Hide file tree
Showing 49 changed files with 30 additions and 254 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-penguins-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Correctly remove new `.codesandbox` folder when copying template
1 change: 1 addition & 0 deletions examples/basics/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/basics/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/blog/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/blog/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/deno/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/deno/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-alpine/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-alpine/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-lit/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-lit/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-multiple/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-multiple/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-preact/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-preact/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-react/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-react/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-solid/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-solid/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-svelte/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-svelte/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/framework-vue/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/framework-vue/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/hackernews/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/hackernews/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/minimal/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/minimal/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/non-html-pages/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/non-html-pages/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/portfolio/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/portfolio/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/ssr/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
1 change: 1 addition & 0 deletions examples/with-markdoc/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-markdoc/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-markdown-plugins/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-markdown-plugins/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-markdown-shiki/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-markdown-shiki/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-mdx/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-mdx/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-nanostores/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-nanostores/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-tailwindcss/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-tailwindcss/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-vite-plugin-pwa/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-vite-plugin-pwa/sandbox.config.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-vitest/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:18-bullseye
11 changes: 0 additions & 11 deletions examples/with-vitest/sandbox.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/create-astro/src/actions/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function template(ctx: Pick<Context, 'template' | 'prompt' | 'dryRu
}

// some files are only needed for online editors when using astro.new. Remove for create-astro installs.
const FILES_TO_REMOVE = ['sandbox.config.json', 'CHANGELOG.md'];
const FILES_TO_REMOVE = ['CHANGELOG.md', '.codesandbox'];
const FILES_TO_UPDATE = {
'package.json': (file: string, overrides: { name: string }) =>
fs.promises.readFile(file, 'utf-8').then((value) => {
Expand Down

0 comments on commit 4e88ffd

Please sign in to comment.