summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/env-vars/.env2
-rw-r--r--examples/env-vars/.gitignore19
-rw-r--r--examples/env-vars/.npmrc2
-rw-r--r--examples/env-vars/.stackblitzrc6
-rw-r--r--examples/env-vars/.vscode/extensions.json4
-rw-r--r--examples/env-vars/.vscode/launch.json11
-rw-r--r--examples/env-vars/README.md9
-rw-r--r--examples/env-vars/astro.config.mjs4
-rw-r--r--examples/env-vars/package.json15
-rw-r--r--examples/env-vars/public/favicon.svg13
-rw-r--r--examples/env-vars/sandbox.config.json11
-rw-r--r--examples/env-vars/src/env.d.ts13
-rw-r--r--examples/env-vars/src/pages/index.astro24
-rw-r--r--examples/env-vars/src/scripts/client.ts9
-rw-r--r--examples/env-vars/tsconfig.json3
-rw-r--r--examples/subpath/.gitignore19
-rw-r--r--examples/subpath/.npmrc2
-rw-r--r--examples/subpath/.stackblitzrc6
-rw-r--r--examples/subpath/README.md47
-rw-r--r--examples/subpath/astro.config.mjs9
-rw-r--r--examples/subpath/package.json18
-rw-r--r--examples/subpath/public/favicon.svg13
-rw-r--r--examples/subpath/public/images/penguin.pngbin77977 -> 0 bytes
-rw-r--r--examples/subpath/sandbox.config.json11
-rw-r--r--examples/subpath/src/components/Time.jsx7
-rw-r--r--examples/subpath/src/env.d.ts1
-rw-r--r--examples/subpath/src/pages/index.astro34
-rw-r--r--examples/subpath/src/styles/main.css3
-rw-r--r--examples/subpath/tsconfig.json3
29 files changed, 0 insertions, 318 deletions
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 @@
-<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
- <path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
- <path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-5-2c-1.4 2.1-.35 4.35.6 5.55.14.17.41.07.47-.15.44-1.8 2.93-1.22 2.93.6 0 2.28.87 3.4 1.72 3.81.34.16.59-.2.49-.56-.31-1.05-.29-2.46 1.29-3.25 3-1.5 3.17-4.83 2.5-6-.67.67-2.6 2-5 2Z"/>
- <defs>
- <linearGradient id="gradient" x1="16" x2="16" y1="32" y2="24" gradientUnits="userSpaceOnUse">
- <stop stop-color="#000"/>
- <stop offset="1" stop-color="#000" stop-opacity="0"/>
- </linearGradient>
- </defs>
- <style>
- @media (prefers-color-scheme:dark){:root{filter:invert(100%)}}
- </style>
-</svg>
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 @@
-/// <reference types="astro/client" />
-
-// 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 });
----
-
-<html lang="en">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width" />
- <meta name="generator" content={Astro.generator} />
- <title>Astro</title>
- </head>
- <body>
- <h1>Hello, Environment Variables!</h1>
- <script src="/src/scripts/client.ts">
-
- </script>
- </body>
-</html>
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 @@
-<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
- <path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
- <path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-5-2c-1.4 2.1-.35 4.35.6 5.55.14.17.41.07.47-.15.44-1.8 2.93-1.22 2.93.6 0 2.28.87 3.4 1.72 3.81.34.16.59-.2.49-.56-.31-1.05-.29-2.46 1.29-3.25 3-1.5 3.17-4.83 2.5-6-.67.67-2.6 2-5 2Z"/>
- <defs>
- <linearGradient id="gradient" x1="16" x2="16" y1="32" y2="24" gradientUnits="userSpaceOnUse">
- <stop stop-color="#000"/>
- <stop offset="1" stop-color="#000" stop-opacity="0"/>
- </linearGradient>
- </defs>
- <style>
- @media (prefers-color-scheme:dark){:root{filter:invert(100%)}}
- </style>
-</svg>
diff --git a/examples/subpath/public/images/penguin.png b/examples/subpath/public/images/penguin.png
deleted file mode 100644
index bc9523bd4..000000000
--- a/examples/subpath/public/images/penguin.png
+++ /dev/null
Binary files 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 <time>{format.format(date)}</time>;
-}
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 @@
-/// <reference types="astro/client" />
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/
----
-
-<html lang="en">
- <head>
- <meta charset="utf-8" />
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <meta name="viewport" content="width=device-width" />
- <meta name="generator" content={Astro.generator} />
- <title>Welcome to Astro</title>
- </head>
-
- <body>
- <h1>Welcome to <a href="https://astro.build/">Astro</a></h1>
-
- <main id="app">
- Today: <Time client:idle />
- </main>
-
- <article>
- <h2>Animals</h2>
-
- <figure>
- <img src="/blog/images/penguin.png" />
- <figcaption>A penguin</figcaption>
- </figure>
- </article>
- </body>
-</html>
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"
-}