mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Update CodeSandbox config for Node 18 and new editor (#8292)
* config: update config for codesandbox * feat: update create-astro to remove .codesandbox folder * chore: changeset * fix: use node18
This commit is contained in:
parent
2a94614433
commit
4e88ffd813
49 changed files with 30 additions and 254 deletions
5
.changeset/soft-penguins-tease.md
Normal file
5
.changeset/soft-penguins-tease.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
---
|
||||
|
||||
Correctly remove new `.codesandbox` folder when copying template
|
1
examples/basics/.codesandbox/Dockerfile
Normal file
1
examples/basics/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/blog/.codesandbox/Dockerfile
Normal file
1
examples/blog/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/deno/.codesandbox/Dockerfile
Normal file
1
examples/deno/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-alpine/.codesandbox/Dockerfile
Normal file
1
examples/framework-alpine/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-lit/.codesandbox/Dockerfile
Normal file
1
examples/framework-lit/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-multiple/.codesandbox/Dockerfile
Normal file
1
examples/framework-multiple/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-preact/.codesandbox/Dockerfile
Normal file
1
examples/framework-preact/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-react/.codesandbox/Dockerfile
Normal file
1
examples/framework-react/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-solid/.codesandbox/Dockerfile
Normal file
1
examples/framework-solid/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-svelte/.codesandbox/Dockerfile
Normal file
1
examples/framework-svelte/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/framework-vue/.codesandbox/Dockerfile
Normal file
1
examples/framework-vue/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/hackernews/.codesandbox/Dockerfile
Normal file
1
examples/hackernews/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/minimal/.codesandbox/Dockerfile
Normal file
1
examples/minimal/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/non-html-pages/.codesandbox/Dockerfile
Normal file
1
examples/non-html-pages/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/portfolio/.codesandbox/Dockerfile
Normal file
1
examples/portfolio/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/ssr/.codesandbox/Dockerfile
Normal file
1
examples/ssr/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
1
examples/with-markdoc/.codesandbox/Dockerfile
Normal file
1
examples/with-markdoc/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-markdown-plugins/.codesandbox/Dockerfile
Normal file
1
examples/with-markdown-plugins/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-markdown-shiki/.codesandbox/Dockerfile
Normal file
1
examples/with-markdown-shiki/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-mdx/.codesandbox/Dockerfile
Normal file
1
examples/with-mdx/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-nanostores/.codesandbox/Dockerfile
Normal file
1
examples/with-nanostores/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-tailwindcss/.codesandbox/Dockerfile
Normal file
1
examples/with-tailwindcss/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-vite-plugin-pwa/.codesandbox/Dockerfile
Normal file
1
examples/with-vite-plugin-pwa/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
1
examples/with-vitest/.codesandbox/Dockerfile
Normal file
1
examples/with-vitest/.codesandbox/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM node:18-bullseye
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"infiniteLoopProtection": true,
|
||||
"hardReloadOnChange": false,
|
||||
"view": "browser",
|
||||
"template": "node",
|
||||
"container": {
|
||||
"port": 4321,
|
||||
"startScript": "start",
|
||||
"node": "14"
|
||||
}
|
||||
}
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue