diff --git a/examples/env-vars/.env b/examples/env-vars/.env deleted file mode 100644 index dd89799f8..000000000 --- a/examples/env-vars/.env +++ /dev/null @@ -1,2 +0,0 @@ -DB_PASSWORD=foobar -PUBLIC_SOME_KEY=123 diff --git a/examples/env-vars/.gitignore b/examples/env-vars/.gitignore deleted file mode 100644 index 02f6e50b4..000000000 --- a/examples/env-vars/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# build output -dist/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/examples/env-vars/.npmrc b/examples/env-vars/.npmrc deleted file mode 100644 index ef83021af..000000000 --- a/examples/env-vars/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -# Expose Astro dependencies for `pnpm` users -shamefully-hoist=true diff --git a/examples/env-vars/.stackblitzrc b/examples/env-vars/.stackblitzrc deleted file mode 100644 index 43798ecff..000000000 --- a/examples/env-vars/.stackblitzrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "startCommand": "npm start", - "env": { - "ENABLE_CJS_IMPORTS": true - } -} \ No newline at end of file diff --git a/examples/env-vars/.vscode/extensions.json b/examples/env-vars/.vscode/extensions.json deleted file mode 100644 index 22a15055d..000000000 --- a/examples/env-vars/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/examples/env-vars/.vscode/launch.json b/examples/env-vars/.vscode/launch.json deleted file mode 100644 index d64220976..000000000 --- a/examples/env-vars/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/examples/env-vars/README.md b/examples/env-vars/README.md deleted file mode 100644 index 686ccd77f..000000000 --- a/examples/env-vars/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Astro Starter Kit: Environment Variables - -``` -npm init astro -- --template env-vars -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/env-vars) - -This example showcases Astro's support for Environment Variables. Please see Vite's [Env Variables and Modes](https://vitejs.dev/guide/env-and-mode.html) guide for more information. diff --git a/examples/env-vars/astro.config.mjs b/examples/env-vars/astro.config.mjs deleted file mode 100644 index 882e6515a..000000000 --- a/examples/env-vars/astro.config.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import { defineConfig } from 'astro/config'; - -// https://astro.build/config -export default defineConfig({}); diff --git a/examples/env-vars/package.json b/examples/env-vars/package.json deleted file mode 100644 index 921db409e..000000000 --- a/examples/env-vars/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@example/env-vars", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", - "preview": "astro preview", - "astro": "astro" - }, - "dependencies": { - "astro": "^1.1.5" - } -} diff --git a/examples/env-vars/public/favicon.svg b/examples/env-vars/public/favicon.svg deleted file mode 100644 index 0f3906297..000000000 --- a/examples/env-vars/public/favicon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/examples/env-vars/sandbox.config.json b/examples/env-vars/sandbox.config.json deleted file mode 100644 index 9178af77d..000000000 --- a/examples/env-vars/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 3000, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/env-vars/src/env.d.ts b/examples/env-vars/src/env.d.ts deleted file mode 100644 index a44cdaa49..000000000 --- a/examples/env-vars/src/env.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// - -// Use this file to type your environment variables! -// See https://docs.astro.build/en/guides/environment-variables/#intellisense-for-typescript for more information - -interface ImportMetaEnv { - readonly DB_PASSWORD: string; - readonly PUBLIC_SOME_KEY: string; -} - -interface ImportMeta { - readonly env: ImportMetaEnv; -} diff --git a/examples/env-vars/src/pages/index.astro b/examples/env-vars/src/pages/index.astro deleted file mode 100644 index db0369979..000000000 --- a/examples/env-vars/src/pages/index.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -const { SSR, DB_PASSWORD, PUBLIC_SOME_KEY } = import.meta.env; - -// DB_PASSWORD is available because we're running on the server -console.log({ SSR, DB_PASSWORD }); - -// PUBLIC_SOME_KEY is available everywhere -console.log({ SSR, PUBLIC_SOME_KEY }); ---- - - - - - - - Astro - - -

Hello, Environment Variables!

- - - diff --git a/examples/env-vars/src/scripts/client.ts b/examples/env-vars/src/scripts/client.ts deleted file mode 100644 index b01c6029e..000000000 --- a/examples/env-vars/src/scripts/client.ts +++ /dev/null @@ -1,9 +0,0 @@ -(() => { - const { SSR, DB_PASSWORD, PUBLIC_SOME_KEY } = import.meta.env; - - // DB_PASSWORD is NOT available because we're running on the client - console.log({ SSR, DB_PASSWORD }); - - // PUBLIC_SOME_KEY is available everywhere - console.log({ SSR, PUBLIC_SOME_KEY }); -})(); diff --git a/examples/env-vars/tsconfig.json b/examples/env-vars/tsconfig.json deleted file mode 100644 index d78f81ec4..000000000 --- a/examples/env-vars/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "astro/tsconfigs/base" -} diff --git a/examples/subpath/.gitignore b/examples/subpath/.gitignore deleted file mode 100644 index 02f6e50b4..000000000 --- a/examples/subpath/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# build output -dist/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/examples/subpath/.npmrc b/examples/subpath/.npmrc deleted file mode 100644 index ef83021af..000000000 --- a/examples/subpath/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -# Expose Astro dependencies for `pnpm` users -shamefully-hoist=true diff --git a/examples/subpath/.stackblitzrc b/examples/subpath/.stackblitzrc deleted file mode 100644 index 43798ecff..000000000 --- a/examples/subpath/.stackblitzrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "startCommand": "npm start", - "env": { - "ENABLE_CJS_IMPORTS": true - } -} \ No newline at end of file diff --git a/examples/subpath/README.md b/examples/subpath/README.md deleted file mode 100644 index 0c138d742..000000000 --- a/examples/subpath/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Astro Starter Kit: A site deployed to a subpath - -``` -npm init astro -- --template subpath -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/subpath?initialPath=/blog/) - -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! - -## 🚀 Project Structure - -Inside of your Astro project, you'll see the following folders and files: - -``` -/ -├── public/ -├── src/ -│ └── components/ -│ └── Time.jsx -│ └── pages/ -│ └── index.astro -└── package.json -``` - -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. - -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - -Any static assets, like images, can be placed in the `public/` directory. - -## 🧞 Commands - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -| :--------------------- | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro --help` | Get help using the Astro CLI | - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/examples/subpath/astro.config.mjs b/examples/subpath/astro.config.mjs deleted file mode 100644 index d76e5ffb5..000000000 --- a/examples/subpath/astro.config.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { defineConfig } from 'astro/config'; -import react from '@astrojs/react'; - -// https://astro.build/config -export default defineConfig({ - integrations: [react()], - site: 'http://example.com', - base: '/blog', -}); diff --git a/examples/subpath/package.json b/examples/subpath/package.json deleted file mode 100644 index 225a13489..000000000 --- a/examples/subpath/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@example/subpath", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", - "preview": "astro preview", - "astro": "astro" - }, - "dependencies": { - "astro": "^1.1.5", - "react": "^18.1.0", - "react-dom": "^18.1.0", - "@astrojs/react": "^1.1.0" - } -} diff --git a/examples/subpath/public/favicon.svg b/examples/subpath/public/favicon.svg deleted file mode 100644 index 0f3906297..000000000 --- a/examples/subpath/public/favicon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/examples/subpath/public/images/penguin.png b/examples/subpath/public/images/penguin.png deleted file mode 100644 index bc9523bd4..000000000 Binary files a/examples/subpath/public/images/penguin.png and /dev/null differ diff --git a/examples/subpath/sandbox.config.json b/examples/subpath/sandbox.config.json deleted file mode 100644 index 9178af77d..000000000 --- a/examples/subpath/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 3000, - "startScript": "start", - "node": "14" - } -} diff --git a/examples/subpath/src/components/Time.jsx b/examples/subpath/src/components/Time.jsx deleted file mode 100644 index 9a89669cb..000000000 --- a/examples/subpath/src/components/Time.jsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react'; - -export default function () { - const date = new Date(); - const format = new Intl.DateTimeFormat('en-US'); - return ; -} diff --git a/examples/subpath/src/env.d.ts b/examples/subpath/src/env.d.ts deleted file mode 100644 index f964fe0cf..000000000 --- a/examples/subpath/src/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/examples/subpath/src/pages/index.astro b/examples/subpath/src/pages/index.astro deleted file mode 100644 index 1a86a554b..000000000 --- a/examples/subpath/src/pages/index.astro +++ /dev/null @@ -1,34 +0,0 @@ ---- -import '../styles/main.css'; -import Time from '../components/Time.jsx'; - -// Full Astro Component Syntax: -// https://docs.astro.build/core-concepts/astro-components/ ---- - - - - - - - - Welcome to Astro - - - -

Welcome to Astro

- -
- Today:
- -
-

Animals

- -
- -
A penguin
-
-
- - diff --git a/examples/subpath/src/styles/main.css b/examples/subpath/src/styles/main.css deleted file mode 100644 index 4f82208f2..000000000 --- a/examples/subpath/src/styles/main.css +++ /dev/null @@ -1,3 +0,0 @@ -#app { - color: tomato; -} diff --git a/examples/subpath/tsconfig.json b/examples/subpath/tsconfig.json deleted file mode 100644 index d78f81ec4..000000000 --- a/examples/subpath/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "astro/tsconfigs/base" -}