diff --git a/.changeset/soft-penguins-tease.md b/.changeset/soft-penguins-tease.md new file mode 100644 index 000000000..3ddc98a26 --- /dev/null +++ b/.changeset/soft-penguins-tease.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +Correctly remove new `.codesandbox` folder when copying template diff --git a/examples/basics/.codesandbox/Dockerfile b/examples/basics/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/basics/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/basics/sandbox.config.json b/examples/basics/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/basics/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/blog/.codesandbox/Dockerfile b/examples/blog/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/blog/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/blog/sandbox.config.json b/examples/blog/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/blog/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/deno/.codesandbox/Dockerfile b/examples/deno/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/deno/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/deno/sandbox.config.json b/examples/deno/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/deno/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-alpine/.codesandbox/Dockerfile b/examples/framework-alpine/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-alpine/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-alpine/sandbox.config.json b/examples/framework-alpine/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-alpine/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-lit/.codesandbox/Dockerfile b/examples/framework-lit/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-lit/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-lit/sandbox.config.json b/examples/framework-lit/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-lit/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-multiple/.codesandbox/Dockerfile b/examples/framework-multiple/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-multiple/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-multiple/sandbox.config.json b/examples/framework-multiple/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-multiple/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-preact/.codesandbox/Dockerfile b/examples/framework-preact/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-preact/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-preact/sandbox.config.json b/examples/framework-preact/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-preact/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-react/.codesandbox/Dockerfile b/examples/framework-react/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-react/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-react/sandbox.config.json b/examples/framework-react/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-react/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-solid/.codesandbox/Dockerfile b/examples/framework-solid/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-solid/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-solid/sandbox.config.json b/examples/framework-solid/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-solid/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-svelte/.codesandbox/Dockerfile b/examples/framework-svelte/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-svelte/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-svelte/sandbox.config.json b/examples/framework-svelte/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-svelte/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/framework-vue/.codesandbox/Dockerfile b/examples/framework-vue/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/framework-vue/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/framework-vue/sandbox.config.json b/examples/framework-vue/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/framework-vue/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/hackernews/.codesandbox/Dockerfile b/examples/hackernews/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/hackernews/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/hackernews/sandbox.config.json b/examples/hackernews/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/hackernews/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/minimal/.codesandbox/Dockerfile b/examples/minimal/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/minimal/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/minimal/sandbox.config.json b/examples/minimal/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/minimal/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/non-html-pages/.codesandbox/Dockerfile b/examples/non-html-pages/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/non-html-pages/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/non-html-pages/sandbox.config.json b/examples/non-html-pages/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/non-html-pages/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/portfolio/.codesandbox/Dockerfile b/examples/portfolio/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/portfolio/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/portfolio/sandbox.config.json b/examples/portfolio/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/portfolio/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/ssr/.codesandbox/Dockerfile b/examples/ssr/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/ssr/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-markdoc/.codesandbox/Dockerfile b/examples/with-markdoc/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-markdoc/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-markdoc/sandbox.config.json b/examples/with-markdoc/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-markdoc/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-markdown-plugins/.codesandbox/Dockerfile b/examples/with-markdown-plugins/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-markdown-plugins/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-markdown-plugins/sandbox.config.json b/examples/with-markdown-plugins/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-markdown-plugins/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-markdown-shiki/.codesandbox/Dockerfile b/examples/with-markdown-shiki/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-markdown-shiki/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-markdown-shiki/sandbox.config.json b/examples/with-markdown-shiki/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-markdown-shiki/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-mdx/.codesandbox/Dockerfile b/examples/with-mdx/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-mdx/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-mdx/sandbox.config.json b/examples/with-mdx/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-mdx/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-nanostores/.codesandbox/Dockerfile b/examples/with-nanostores/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-nanostores/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-nanostores/sandbox.config.json b/examples/with-nanostores/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-nanostores/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-tailwindcss/.codesandbox/Dockerfile b/examples/with-tailwindcss/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-tailwindcss/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-tailwindcss/sandbox.config.json b/examples/with-tailwindcss/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-tailwindcss/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-vite-plugin-pwa/.codesandbox/Dockerfile b/examples/with-vite-plugin-pwa/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-vite-plugin-pwa/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-vite-plugin-pwa/sandbox.config.json b/examples/with-vite-plugin-pwa/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-vite-plugin-pwa/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/with-vitest/.codesandbox/Dockerfile b/examples/with-vitest/.codesandbox/Dockerfile new file mode 100644 index 000000000..c3b5c81a1 --- /dev/null +++ b/examples/with-vitest/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18-bullseye diff --git a/examples/with-vitest/sandbox.config.json b/examples/with-vitest/sandbox.config.json deleted file mode 100644 index 8e476b8cc..000000000 --- a/examples/with-vitest/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 4321, - "startScript": "start", - "node": "14" - } -} diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts index 887ba69f5..3d3d1075d 100644 --- a/packages/create-astro/src/actions/template.ts +++ b/packages/create-astro/src/actions/template.ts @@ -48,7 +48,7 @@ export async function template(ctx: Pick fs.promises.readFile(file, 'utf-8').then((value) => {