diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/astro-nanostores/README.md | 40 | ||||
-rw-r--r-- | examples/blog/package.json | 2 | ||||
-rw-r--r-- | examples/docs/package.json | 4 | ||||
-rw-r--r-- | examples/framework-multiple/.gitignore (renamed from examples/astro-nanostores/.gitignore) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/.npmrc (renamed from examples/astro-markdown/.npmrc) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/README.md | 7 | ||||
-rw-r--r-- | examples/framework-multiple/package.json | 15 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/A.astro (renamed from examples/with-multiple-frameworks/src/components/A.astro) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/B.astro (renamed from examples/with-multiple-frameworks/src/components/B.astro) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/PreactCounter.tsx (renamed from examples/with-multiple-frameworks/src/components/PreactCounter.tsx) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/ReactCounter.jsx (renamed from examples/with-multiple-frameworks/src/components/ReactCounter.jsx) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/SvelteCounter.svelte (renamed from examples/astro-markdown/src/components/SvelteCounter.svelte) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/VueCounter.vue (renamed from examples/astro-markdown/src/components/VueCounter.vue) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/components/index.ts (renamed from examples/with-multiple-frameworks/src/components/index.ts) | 0 | ||||
-rw-r--r-- | examples/framework-multiple/src/pages/index.astro (renamed from examples/with-multiple-frameworks/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/framework-preact/.gitignore | 18 | ||||
-rw-r--r-- | examples/framework-preact/.npmrc (renamed from examples/astro-nanostores/.npmrc) | 0 | ||||
-rw-r--r-- | examples/framework-preact/README.md | 7 | ||||
-rw-r--r-- | examples/framework-preact/package.json (renamed from examples/with-svelte/package.json) | 4 | ||||
-rw-r--r-- | examples/framework-preact/src/components/Counter.tsx (renamed from examples/with-preact/src/components/Counter.tsx) | 0 | ||||
-rw-r--r-- | examples/framework-preact/src/pages/index.astro (renamed from examples/with-preact/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/framework-react/.gitignore | 18 | ||||
-rw-r--r-- | examples/framework-react/.npmrc (renamed from examples/tailwindcss/.npmrc) | 0 | ||||
-rw-r--r-- | examples/framework-react/README.md | 7 | ||||
-rw-r--r-- | examples/framework-react/package.json (renamed from examples/with-preact/package.json) | 4 | ||||
-rw-r--r-- | examples/framework-react/src/components/Counter.jsx (renamed from examples/with-react/src/components/Counter.jsx) | 0 | ||||
-rw-r--r-- | examples/framework-react/src/pages/index.astro (renamed from examples/with-react/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/framework-svelte/.gitignore | 18 | ||||
-rw-r--r-- | examples/framework-svelte/.npmrc (renamed from examples/with-multiple-frameworks/.npmrc) | 0 | ||||
-rw-r--r-- | examples/framework-svelte/README.md | 5 | ||||
-rw-r--r-- | examples/framework-svelte/package.json | 15 | ||||
-rw-r--r-- | examples/framework-svelte/src/components/Counter.svelte (renamed from examples/with-svelte/src/components/Counter.svelte) | 0 | ||||
-rw-r--r-- | examples/framework-svelte/src/pages/index.astro (renamed from examples/with-svelte/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/framework-vue/.gitignore | 18 | ||||
-rw-r--r-- | examples/framework-vue/.npmrc (renamed from examples/with-preact/.npmrc) | 0 | ||||
-rw-r--r-- | examples/framework-vue/README.md | 5 | ||||
-rw-r--r-- | examples/framework-vue/package.json (renamed from examples/astro-markdown/package.json) | 6 | ||||
-rw-r--r-- | examples/framework-vue/src/components/Counter.vue (renamed from examples/with-vue/src/components/Counter.vue) | 0 | ||||
-rw-r--r-- | examples/framework-vue/src/pages/index.astro (renamed from examples/with-vue/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/portfolio/package.json | 4 | ||||
-rw-r--r-- | examples/snowpack/.gitignore | 20 | ||||
-rw-r--r-- | examples/snowpack/package.json | 2 | ||||
-rw-r--r-- | examples/starter/package.json | 4 | ||||
-rw-r--r-- | examples/tailwindcss/.gitignore | 1 | ||||
-rw-r--r-- | examples/tailwindcss/README.md | 23 | ||||
-rw-r--r-- | examples/with-markdown/.gitignore | 18 | ||||
-rw-r--r-- | examples/with-markdown/.npmrc (renamed from examples/with-react/.npmrc) | 0 | ||||
-rw-r--r-- | examples/with-markdown/README.md | 6 | ||||
-rw-r--r-- | examples/with-markdown/package.json (renamed from examples/with-react/package.json) | 6 | ||||
-rw-r--r-- | examples/with-markdown/public/styles/global.scss (renamed from examples/astro-markdown/public/styles/global.scss) | 0 | ||||
-rw-r--r-- | examples/with-markdown/public/styles/prism.scss (renamed from examples/astro-markdown/public/styles/prism.scss) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/components/PreactCounter.tsx (renamed from examples/astro-markdown/src/components/PreactCounter.tsx) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/components/ReactCounter.jsx (renamed from examples/astro-markdown/src/components/ReactCounter.jsx) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/components/SvelteCounter.svelte (renamed from examples/with-multiple-frameworks/src/components/SvelteCounter.svelte) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/components/VueCounter.vue (renamed from examples/with-multiple-frameworks/src/components/VueCounter.vue) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/layouts/main.astro (renamed from examples/astro-markdown/src/layouts/main.astro) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/pages/index.astro (renamed from examples/astro-markdown/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/with-markdown/src/pages/other.md (renamed from examples/astro-markdown/src/pages/other.md) | 0 | ||||
-rw-r--r-- | examples/with-multiple-frameworks/package.json | 15 | ||||
-rw-r--r-- | examples/with-nanostores/.gitignore | 18 | ||||
-rw-r--r-- | examples/with-nanostores/.npmrc (renamed from examples/with-svelte/.npmrc) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/README.md | 3 | ||||
-rw-r--r-- | examples/with-nanostores/astro.config.mjs (renamed from examples/astro-nanostores/astro.config.mjs) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/package.json (renamed from examples/astro-nanostores/package.json) | 7 | ||||
-rw-r--r-- | examples/with-nanostores/public/assets/logo.svg (renamed from examples/astro-nanostores/public/assets/logo.svg) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/public/favicon.svg (renamed from examples/astro-nanostores/public/favicon.svg) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/public/robots.txt (renamed from examples/astro-nanostores/public/robots.txt) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/public/style/global.css (renamed from examples/astro-nanostores/public/style/global.css) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/public/style/home.css (renamed from examples/astro-nanostores/public/style/home.css) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/components/AdminsPreact.jsx (renamed from examples/astro-nanostores/src/components/AdminsPreact.jsx) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/components/AdminsReact.jsx (renamed from examples/astro-nanostores/src/components/AdminsReact.jsx) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/components/AdminsSvelte.svelte (renamed from examples/astro-nanostores/src/components/AdminsSvelte.svelte) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/components/AdminsVue.vue (renamed from examples/astro-nanostores/src/components/AdminsVue.vue) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/pages/index.astro (renamed from examples/astro-nanostores/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/store/admins.js (renamed from examples/astro-nanostores/src/store/admins.js) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/store/counter.js (renamed from examples/astro-nanostores/src/store/counter.js) | 0 | ||||
-rw-r--r-- | examples/with-nanostores/src/store/users.js (renamed from examples/astro-nanostores/src/store/users.js) | 0 | ||||
-rw-r--r-- | examples/with-tailwindcss/.gitignore | 18 | ||||
-rw-r--r-- | examples/with-tailwindcss/.npmrc (renamed from examples/with-vue/.npmrc) | 0 | ||||
-rw-r--r-- | examples/with-tailwindcss/README.md | 5 | ||||
-rw-r--r-- | examples/with-tailwindcss/astro.config.mjs (renamed from examples/tailwindcss/astro.config.mjs) | 0 | ||||
-rw-r--r-- | examples/with-tailwindcss/package.json (renamed from examples/tailwindcss/package.json) | 4 | ||||
-rw-r--r-- | examples/with-tailwindcss/public/global.css (renamed from examples/tailwindcss/public/global.css) | 0 | ||||
-rw-r--r-- | examples/with-tailwindcss/src/components/Button.astro (renamed from examples/tailwindcss/src/components/Button.astro) | 0 | ||||
-rw-r--r-- | examples/with-tailwindcss/src/pages/index.astro (renamed from examples/tailwindcss/src/pages/index.astro) | 0 | ||||
-rw-r--r-- | examples/with-tailwindcss/tailwind.config.js (renamed from examples/tailwindcss/tailwind.config.js) | 0 | ||||
-rw-r--r-- | examples/with-vue/package.json | 15 |
87 files changed, 243 insertions, 119 deletions
diff --git a/examples/astro-nanostores/README.md b/examples/astro-nanostores/README.md deleted file mode 100644 index ad3eab67e..000000000 --- a/examples/astro-nanostores/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Welcome to [Astro](https://astro.build) - [nanostores](https://github.com/nanostores/nanostores) - -This is a test of a shared store between components from different frameworks/libs using [nanostores](https://github.com/nanostores/nanostores). - -## 🚀 Project Structure - -Inside of your Astro project, you'll see the following folders and files: - -``` -/ -├── public/ -│ ├── robots.txt -│ └── favicon.ico -├── src/ -│ ├── components/ -│ │ └── Tour.astro -│ └── 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 start` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://github.com/snowpackjs/astro) or jump into our [Discord server](https://astro.build/chat). diff --git a/examples/blog/package.json b/examples/blog/package.json index 00ec77f07..b7a470896 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/docs/package.json b/examples/docs/package.json index 34ade97ce..27f273b3a 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/docs-template", + "name": "@astrojs/example-docs", "version": "0.0.2", "private": true, "scripts": { @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/astro-nanostores/.gitignore b/examples/framework-multiple/.gitignore index d436c6dad..d436c6dad 100644 --- a/examples/astro-nanostores/.gitignore +++ b/examples/framework-multiple/.gitignore diff --git a/examples/astro-markdown/.npmrc b/examples/framework-multiple/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/astro-markdown/.npmrc +++ b/examples/framework-multiple/.npmrc diff --git a/examples/framework-multiple/README.md b/examples/framework-multiple/README.md new file mode 100644 index 000000000..42f8e2b1f --- /dev/null +++ b/examples/framework-multiple/README.md @@ -0,0 +1,7 @@ +# Using Preact with Astro + +This example showcases Astro's built-in support for multiple frameworks ([React](https://reactjs.org), [Preact](https://preactjs.com), [Svelte](https://svelte.dev), and [Vue (`v3.x`)](https://v3.vuejs.org/)). + +No configuration is needed to enable these frameworks—just start writing components in `src/components`. + +> **Note**: If used, components _must_ include a JSX factory (ex. `import React from "react"`, `import { h } from "preact"`). Astro is unable to determine which framework is used without having the [JSX factory](https://mariusschulz.com/blog/per-file-jsx-factories-in-typescript#what-is-a-jsx-factory) in scope. diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json new file mode 100644 index 000000000..e0845d1ca --- /dev/null +++ b/examples/framework-multiple/package.json @@ -0,0 +1,15 @@ +{ + "name": "@astrojs/example-framework-multiple", + "private": true, + "version": "0.0.1", + "scripts": { + "start": "astro dev", + "build": "astro build" + }, + "devDependencies": { + "astro": "^0.15.1" + }, + "snowpack": { + "workspaceRoot": "../.." + } +} diff --git a/examples/with-multiple-frameworks/src/components/A.astro b/examples/framework-multiple/src/components/A.astro index 702a4be35..702a4be35 100644 --- a/examples/with-multiple-frameworks/src/components/A.astro +++ b/examples/framework-multiple/src/components/A.astro diff --git a/examples/with-multiple-frameworks/src/components/B.astro b/examples/framework-multiple/src/components/B.astro index 9022cb372..9022cb372 100644 --- a/examples/with-multiple-frameworks/src/components/B.astro +++ b/examples/framework-multiple/src/components/B.astro diff --git a/examples/with-multiple-frameworks/src/components/PreactCounter.tsx b/examples/framework-multiple/src/components/PreactCounter.tsx index be4ddb6ce..be4ddb6ce 100644 --- a/examples/with-multiple-frameworks/src/components/PreactCounter.tsx +++ b/examples/framework-multiple/src/components/PreactCounter.tsx diff --git a/examples/with-multiple-frameworks/src/components/ReactCounter.jsx b/examples/framework-multiple/src/components/ReactCounter.jsx index 06d8f2513..06d8f2513 100644 --- a/examples/with-multiple-frameworks/src/components/ReactCounter.jsx +++ b/examples/framework-multiple/src/components/ReactCounter.jsx diff --git a/examples/astro-markdown/src/components/SvelteCounter.svelte b/examples/framework-multiple/src/components/SvelteCounter.svelte index 8d6b3f5e1..8d6b3f5e1 100644 --- a/examples/astro-markdown/src/components/SvelteCounter.svelte +++ b/examples/framework-multiple/src/components/SvelteCounter.svelte diff --git a/examples/astro-markdown/src/components/VueCounter.vue b/examples/framework-multiple/src/components/VueCounter.vue index 8179fb1d9..8179fb1d9 100644 --- a/examples/astro-markdown/src/components/VueCounter.vue +++ b/examples/framework-multiple/src/components/VueCounter.vue diff --git a/examples/with-multiple-frameworks/src/components/index.ts b/examples/framework-multiple/src/components/index.ts index 4077dcacd..4077dcacd 100644 --- a/examples/with-multiple-frameworks/src/components/index.ts +++ b/examples/framework-multiple/src/components/index.ts diff --git a/examples/with-multiple-frameworks/src/pages/index.astro b/examples/framework-multiple/src/pages/index.astro index 3fbef72e0..3fbef72e0 100644 --- a/examples/with-multiple-frameworks/src/pages/index.astro +++ b/examples/framework-multiple/src/pages/index.astro diff --git a/examples/framework-preact/.gitignore b/examples/framework-preact/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/framework-preact/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/astro-nanostores/.npmrc b/examples/framework-preact/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/astro-nanostores/.npmrc +++ b/examples/framework-preact/.npmrc diff --git a/examples/framework-preact/README.md b/examples/framework-preact/README.md new file mode 100644 index 000000000..d948d9a4a --- /dev/null +++ b/examples/framework-preact/README.md @@ -0,0 +1,7 @@ +# Using Preact with Astro + +This example showcases Astro's built-in support for [Preact](https://preactjs.com/). + +No configuration is needed to enable Preact support—just start writing Preact components in `src/components`. + +> **Note**: If used, components _must_ include the JSX factory (ex. `import { h } from "preact"`). Astro is unable to determine which framework is used without having the [JSX factory](https://mariusschulz.com/blog/per-file-jsx-factories-in-typescript#what-is-a-jsx-factory) in scope. diff --git a/examples/with-svelte/package.json b/examples/framework-preact/package.json index 22220cb7c..fafeea7af 100644 --- a/examples/with-svelte/package.json +++ b/examples/framework-preact/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/with-svelte-example", + "name": "@astrojs/example-framework-preact", "private": true, "version": "0.0.1", "scripts": { @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/with-preact/src/components/Counter.tsx b/examples/framework-preact/src/components/Counter.tsx index 7c520b167..7c520b167 100644 --- a/examples/with-preact/src/components/Counter.tsx +++ b/examples/framework-preact/src/components/Counter.tsx diff --git a/examples/with-preact/src/pages/index.astro b/examples/framework-preact/src/pages/index.astro index 66fa9e84b..66fa9e84b 100644 --- a/examples/with-preact/src/pages/index.astro +++ b/examples/framework-preact/src/pages/index.astro diff --git a/examples/framework-react/.gitignore b/examples/framework-react/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/framework-react/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/tailwindcss/.npmrc b/examples/framework-react/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/tailwindcss/.npmrc +++ b/examples/framework-react/.npmrc diff --git a/examples/framework-react/README.md b/examples/framework-react/README.md new file mode 100644 index 000000000..016cf0f21 --- /dev/null +++ b/examples/framework-react/README.md @@ -0,0 +1,7 @@ +# Using React with Astro + +This example showcases Astro's built-in support for [React](https://reactjs.org/). + +No configuration is needed to enable React support—just start writing React components in `src/components`. + +> **Note**: If used, components _must_ include the JSX factory (ex. `import React from "react"`). Astro is unable to determine which framework is used without having the [JSX factory](https://mariusschulz.com/blog/per-file-jsx-factories-in-typescript#what-is-a-jsx-factory) in scope. diff --git a/examples/with-preact/package.json b/examples/framework-react/package.json index 0daf05f53..afe01f3af 100644 --- a/examples/with-preact/package.json +++ b/examples/framework-react/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/with-preact-example", + "name": "@astrojs/example-framework-react", "private": true, "version": "0.0.1", "scripts": { @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/with-react/src/components/Counter.jsx b/examples/framework-react/src/components/Counter.jsx index 3ab6728e7..3ab6728e7 100644 --- a/examples/with-react/src/components/Counter.jsx +++ b/examples/framework-react/src/components/Counter.jsx diff --git a/examples/with-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro index 3bd650e02..3bd650e02 100644 --- a/examples/with-react/src/pages/index.astro +++ b/examples/framework-react/src/pages/index.astro diff --git a/examples/framework-svelte/.gitignore b/examples/framework-svelte/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/framework-svelte/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/with-multiple-frameworks/.npmrc b/examples/framework-svelte/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/with-multiple-frameworks/.npmrc +++ b/examples/framework-svelte/.npmrc diff --git a/examples/framework-svelte/README.md b/examples/framework-svelte/README.md new file mode 100644 index 000000000..a6c995ac4 --- /dev/null +++ b/examples/framework-svelte/README.md @@ -0,0 +1,5 @@ +# Using Svelte with Astro + +This example showcases Astro's built-in support for [Svelte](https://svelte.dev/). + +No configuration is needed to enable Svelte support—just start writing Svelte components in `src/components`. diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json new file mode 100644 index 000000000..6489eb581 --- /dev/null +++ b/examples/framework-svelte/package.json @@ -0,0 +1,15 @@ +{ + "name": "@astrojs/example-framework-svelte", + "private": true, + "version": "0.0.1", + "scripts": { + "start": "astro dev", + "build": "astro build" + }, + "devDependencies": { + "astro": "^0.15.1" + }, + "snowpack": { + "workspaceRoot": "../.." + } +} diff --git a/examples/with-svelte/src/components/Counter.svelte b/examples/framework-svelte/src/components/Counter.svelte index 9aaf421c1..9aaf421c1 100644 --- a/examples/with-svelte/src/components/Counter.svelte +++ b/examples/framework-svelte/src/components/Counter.svelte diff --git a/examples/with-svelte/src/pages/index.astro b/examples/framework-svelte/src/pages/index.astro index 5a0c1039d..5a0c1039d 100644 --- a/examples/with-svelte/src/pages/index.astro +++ b/examples/framework-svelte/src/pages/index.astro diff --git a/examples/framework-vue/.gitignore b/examples/framework-vue/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/framework-vue/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/with-preact/.npmrc b/examples/framework-vue/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/with-preact/.npmrc +++ b/examples/framework-vue/.npmrc diff --git a/examples/framework-vue/README.md b/examples/framework-vue/README.md new file mode 100644 index 000000000..a6c4683ba --- /dev/null +++ b/examples/framework-vue/README.md @@ -0,0 +1,5 @@ +# Using Vue with Astro + +This example showcases Astro's built-in support for [Vue (`v3.x`)](https://v3.vuejs.org/). + +No configuration is needed to enable Vue support—just start writing Vue components in `src/components`. diff --git a/examples/astro-markdown/package.json b/examples/framework-vue/package.json index 5565b0b14..b7bb5b67d 100644 --- a/examples/astro-markdown/package.json +++ b/examples/framework-vue/package.json @@ -1,13 +1,13 @@ { - "name": "@astrojs/markdown-example", - "version": "0.0.1", + "name": "@astrojs/example-framework-vue", "private": true, + "version": "0.0.1", "scripts": { "start": "astro dev", "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/with-vue/src/components/Counter.vue b/examples/framework-vue/src/components/Counter.vue index 8179fb1d9..8179fb1d9 100644 --- a/examples/with-vue/src/components/Counter.vue +++ b/examples/framework-vue/src/components/Counter.vue diff --git a/examples/with-vue/src/pages/index.astro b/examples/framework-vue/src/pages/index.astro index 949012d0f..949012d0f 100644 --- a/examples/with-vue/src/pages/index.astro +++ b/examples/framework-vue/src/pages/index.astro diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 8267c9d20..aa00a00ad 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/portfolio-template", + "name": "@astrojs/example-portfolio", "private": true, "version": "0.0.1", "scripts": { @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/snowpack/.gitignore b/examples/snowpack/.gitignore index 8a882418f..d436c6dad 100644 --- a/examples/snowpack/.gitignore +++ b/examples/snowpack/.gitignore @@ -1,4 +1,18 @@ -.DS_Store -build -node_modules +# build output dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/snowpack/package.json b/examples/snowpack/package.json index bbbe2f035..66121306a 100644 --- a/examples/snowpack/package.json +++ b/examples/snowpack/package.json @@ -1,5 +1,5 @@ { - "name": "@example/snowpack", + "name": "@astrojs/example-snowpack", "private": true, "version": "3.0.0", "scripts": { diff --git a/examples/starter/package.json b/examples/starter/package.json index b096d72b8..9eaf077a4 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/starter-kit", + "name": "@astrojs/example-starter", "version": "0.0.1", "private": true, "scripts": { @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/tailwindcss/.gitignore b/examples/tailwindcss/.gitignore deleted file mode 100644 index 1521c8b76..000000000 --- a/examples/tailwindcss/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/examples/tailwindcss/README.md b/examples/tailwindcss/README.md deleted file mode 100644 index dd96562bd..000000000 --- a/examples/tailwindcss/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Astro + Tailwind - -## Setup - -``` -npm install -``` - -## Dev - -``` -npm start -``` - -Preview at `http://localhost:3000` - -## Build - -``` -npm build -``` - -Will output static site at `./dist` diff --git a/examples/with-markdown/.gitignore b/examples/with-markdown/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/with-markdown/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/with-react/.npmrc b/examples/with-markdown/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/with-react/.npmrc +++ b/examples/with-markdown/.npmrc diff --git a/examples/with-markdown/README.md b/examples/with-markdown/README.md new file mode 100644 index 000000000..fa0ac5030 --- /dev/null +++ b/examples/with-markdown/README.md @@ -0,0 +1,6 @@ +# Astro with Markdown + +This example showcases Astro's [built-in Markdown support](../../docs/markdown.md). + +- `src/pages/index.astro` uses Astro's `<Markdown>` component. +- `src/pages/other.md` is a treated as a page entrypoint and uses a `layout`. diff --git a/examples/with-react/package.json b/examples/with-markdown/package.json index 9c09d6154..c9695641b 100644 --- a/examples/with-react/package.json +++ b/examples/with-markdown/package.json @@ -1,13 +1,13 @@ { - "name": "@astrojs/with-react-example", - "private": true, + "name": "@astrojs/example-with-markdown", "version": "0.0.1", + "private": true, "scripts": { "start": "astro dev", "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/astro-markdown/public/styles/global.scss b/examples/with-markdown/public/styles/global.scss index 1eda4646f..1eda4646f 100644 --- a/examples/astro-markdown/public/styles/global.scss +++ b/examples/with-markdown/public/styles/global.scss diff --git a/examples/astro-markdown/public/styles/prism.scss b/examples/with-markdown/public/styles/prism.scss index 29a3cf5d8..29a3cf5d8 100644 --- a/examples/astro-markdown/public/styles/prism.scss +++ b/examples/with-markdown/public/styles/prism.scss diff --git a/examples/astro-markdown/src/components/PreactCounter.tsx b/examples/with-markdown/src/components/PreactCounter.tsx index e3761643f..e3761643f 100644 --- a/examples/astro-markdown/src/components/PreactCounter.tsx +++ b/examples/with-markdown/src/components/PreactCounter.tsx diff --git a/examples/astro-markdown/src/components/ReactCounter.jsx b/examples/with-markdown/src/components/ReactCounter.jsx index 92871a8d8..92871a8d8 100644 --- a/examples/astro-markdown/src/components/ReactCounter.jsx +++ b/examples/with-markdown/src/components/ReactCounter.jsx diff --git a/examples/with-multiple-frameworks/src/components/SvelteCounter.svelte b/examples/with-markdown/src/components/SvelteCounter.svelte index 8d6b3f5e1..8d6b3f5e1 100644 --- a/examples/with-multiple-frameworks/src/components/SvelteCounter.svelte +++ b/examples/with-markdown/src/components/SvelteCounter.svelte diff --git a/examples/with-multiple-frameworks/src/components/VueCounter.vue b/examples/with-markdown/src/components/VueCounter.vue index 8179fb1d9..8179fb1d9 100644 --- a/examples/with-multiple-frameworks/src/components/VueCounter.vue +++ b/examples/with-markdown/src/components/VueCounter.vue diff --git a/examples/astro-markdown/src/layouts/main.astro b/examples/with-markdown/src/layouts/main.astro index 26993bcaf..26993bcaf 100644 --- a/examples/astro-markdown/src/layouts/main.astro +++ b/examples/with-markdown/src/layouts/main.astro diff --git a/examples/astro-markdown/src/pages/index.astro b/examples/with-markdown/src/pages/index.astro index 666e0557f..666e0557f 100644 --- a/examples/astro-markdown/src/pages/index.astro +++ b/examples/with-markdown/src/pages/index.astro diff --git a/examples/astro-markdown/src/pages/other.md b/examples/with-markdown/src/pages/other.md index d4180940d..d4180940d 100644 --- a/examples/astro-markdown/src/pages/other.md +++ b/examples/with-markdown/src/pages/other.md diff --git a/examples/with-multiple-frameworks/package.json b/examples/with-multiple-frameworks/package.json deleted file mode 100644 index 8213a731f..000000000 --- a/examples/with-multiple-frameworks/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@astrojs/with-multiple-frameworks-example", - "private": true, - "version": "0.0.1", - "scripts": { - "start": "astro dev", - "build": "astro build" - }, - "devDependencies": { - "astro": "^0.15.0" - }, - "snowpack": { - "workspaceRoot": "../.." - } -} diff --git a/examples/with-nanostores/.gitignore b/examples/with-nanostores/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/with-nanostores/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/with-svelte/.npmrc b/examples/with-nanostores/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/with-svelte/.npmrc +++ b/examples/with-nanostores/.npmrc diff --git a/examples/with-nanostores/README.md b/examples/with-nanostores/README.md new file mode 100644 index 000000000..e74f30fd0 --- /dev/null +++ b/examples/with-nanostores/README.md @@ -0,0 +1,3 @@ +# Astro with [`nanostores`](https://github.com/nanostores/nanostores) + +This example showcases using [`nanostores`](https://github.com/nanostores/nanostores) to provide shared state between components from different frameworks. diff --git a/examples/astro-nanostores/astro.config.mjs b/examples/with-nanostores/astro.config.mjs index e16ed1327..e16ed1327 100644 --- a/examples/astro-nanostores/astro.config.mjs +++ b/examples/with-nanostores/astro.config.mjs diff --git a/examples/astro-nanostores/package.json b/examples/with-nanostores/package.json index 51cbc2a68..c1e35f87f 100644 --- a/examples/astro-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/with-nanostores", + "name": "@astrojs/example-with-nanostores", "version": "0.0.1", "private": true, "scripts": { @@ -7,9 +7,12 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.15.0" + "astro": "^0.15.1" }, "dependencies": { "nanostores": "^0.3.3" + }, + "snowpack": { + "workspaceRoot": "../.." } } diff --git a/examples/astro-nanostores/public/assets/logo.svg b/examples/with-nanostores/public/assets/logo.svg index d751556b2..d751556b2 100644 --- a/examples/astro-nanostores/public/assets/logo.svg +++ b/examples/with-nanostores/public/assets/logo.svg diff --git a/examples/astro-nanostores/public/favicon.svg b/examples/with-nanostores/public/favicon.svg index 542f90aec..542f90aec 100644 --- a/examples/astro-nanostores/public/favicon.svg +++ b/examples/with-nanostores/public/favicon.svg diff --git a/examples/astro-nanostores/public/robots.txt b/examples/with-nanostores/public/robots.txt index 1f53798bb..1f53798bb 100644 --- a/examples/astro-nanostores/public/robots.txt +++ b/examples/with-nanostores/public/robots.txt diff --git a/examples/astro-nanostores/public/style/global.css b/examples/with-nanostores/public/style/global.css index e1a3a6bd1..e1a3a6bd1 100644 --- a/examples/astro-nanostores/public/style/global.css +++ b/examples/with-nanostores/public/style/global.css diff --git a/examples/astro-nanostores/public/style/home.css b/examples/with-nanostores/public/style/home.css index c4271a845..c4271a845 100644 --- a/examples/astro-nanostores/public/style/home.css +++ b/examples/with-nanostores/public/style/home.css diff --git a/examples/astro-nanostores/src/components/AdminsPreact.jsx b/examples/with-nanostores/src/components/AdminsPreact.jsx index 93fecd878..93fecd878 100644 --- a/examples/astro-nanostores/src/components/AdminsPreact.jsx +++ b/examples/with-nanostores/src/components/AdminsPreact.jsx diff --git a/examples/astro-nanostores/src/components/AdminsReact.jsx b/examples/with-nanostores/src/components/AdminsReact.jsx index a03df1f47..a03df1f47 100644 --- a/examples/astro-nanostores/src/components/AdminsReact.jsx +++ b/examples/with-nanostores/src/components/AdminsReact.jsx diff --git a/examples/astro-nanostores/src/components/AdminsSvelte.svelte b/examples/with-nanostores/src/components/AdminsSvelte.svelte index a98444b4f..a98444b4f 100644 --- a/examples/astro-nanostores/src/components/AdminsSvelte.svelte +++ b/examples/with-nanostores/src/components/AdminsSvelte.svelte diff --git a/examples/astro-nanostores/src/components/AdminsVue.vue b/examples/with-nanostores/src/components/AdminsVue.vue index 68dcd2065..68dcd2065 100644 --- a/examples/astro-nanostores/src/components/AdminsVue.vue +++ b/examples/with-nanostores/src/components/AdminsVue.vue diff --git a/examples/astro-nanostores/src/pages/index.astro b/examples/with-nanostores/src/pages/index.astro index 3d7e1d4d6..3d7e1d4d6 100644 --- a/examples/astro-nanostores/src/pages/index.astro +++ b/examples/with-nanostores/src/pages/index.astro diff --git a/examples/astro-nanostores/src/store/admins.js b/examples/with-nanostores/src/store/admins.js index 91215470b..91215470b 100644 --- a/examples/astro-nanostores/src/store/admins.js +++ b/examples/with-nanostores/src/store/admins.js diff --git a/examples/astro-nanostores/src/store/counter.js b/examples/with-nanostores/src/store/counter.js index a57d8e2c3..a57d8e2c3 100644 --- a/examples/astro-nanostores/src/store/counter.js +++ b/examples/with-nanostores/src/store/counter.js diff --git a/examples/astro-nanostores/src/store/users.js b/examples/with-nanostores/src/store/users.js index 719f75cd1..719f75cd1 100644 --- a/examples/astro-nanostores/src/store/users.js +++ b/examples/with-nanostores/src/store/users.js diff --git a/examples/with-tailwindcss/.gitignore b/examples/with-tailwindcss/.gitignore new file mode 100644 index 000000000..d436c6dad --- /dev/null +++ b/examples/with-tailwindcss/.gitignore @@ -0,0 +1,18 @@ +# build output +dist + +# dependencies +node_modules/ +.snowpack/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/with-vue/.npmrc b/examples/with-tailwindcss/.npmrc index 0cc653b2c..0cc653b2c 100644 --- a/examples/with-vue/.npmrc +++ b/examples/with-tailwindcss/.npmrc diff --git a/examples/with-tailwindcss/README.md b/examples/with-tailwindcss/README.md new file mode 100644 index 000000000..20979a78f --- /dev/null +++ b/examples/with-tailwindcss/README.md @@ -0,0 +1,5 @@ +# Astro with [Tailwind](https://tailwindcss.com) + +Astro comes with Tailwind support out of the box. This example showcases how to style your Astro project with [Tailwind](https://tailwindcss.com). + +For complete setup instructions, please see our [Styling Guide](https://github.com/snowpackjs/astro/blob/main/docs/styling.md#-tailwind). diff --git a/examples/tailwindcss/astro.config.mjs b/examples/with-tailwindcss/astro.config.mjs index 7e6aaa3fd..7e6aaa3fd 100644 --- a/examples/tailwindcss/astro.config.mjs +++ b/examples/with-tailwindcss/astro.config.mjs diff --git a/examples/tailwindcss/package.json b/examples/with-tailwindcss/package.json index 2efe251e7..befb7afef 100644 --- a/examples/tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -1,5 +1,5 @@ { - "name": "@astrojs/tailwind-example", + "name": "@astrojs/example-with-tailwindcss", "version": "0.0.1", "private": true, "scripts": { @@ -8,7 +8,7 @@ }, "devDependencies": { "tailwindcss": "^2.1.2", - "astro": "^0.15.0" + "astro": "^0.15.1" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/tailwindcss/public/global.css b/examples/with-tailwindcss/public/global.css index b5c61c956..b5c61c956 100644 --- a/examples/tailwindcss/public/global.css +++ b/examples/with-tailwindcss/public/global.css diff --git a/examples/tailwindcss/src/components/Button.astro b/examples/with-tailwindcss/src/components/Button.astro index 64baa50ae..64baa50ae 100644 --- a/examples/tailwindcss/src/components/Button.astro +++ b/examples/with-tailwindcss/src/components/Button.astro diff --git a/examples/tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro index 00ac41dac..00ac41dac 100644 --- a/examples/tailwindcss/src/pages/index.astro +++ b/examples/with-tailwindcss/src/pages/index.astro diff --git a/examples/tailwindcss/tailwind.config.js b/examples/with-tailwindcss/tailwind.config.js index dc8c3ae87..dc8c3ae87 100644 --- a/examples/tailwindcss/tailwind.config.js +++ b/examples/with-tailwindcss/tailwind.config.js diff --git a/examples/with-vue/package.json b/examples/with-vue/package.json deleted file mode 100644 index a3d07b573..000000000 --- a/examples/with-vue/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@astrojs/with-vue-example", - "private": true, - "version": "0.0.1", - "scripts": { - "start": "astro dev", - "build": "astro build" - }, - "devDependencies": { - "astro": "^0.15.0" - }, - "snowpack": { - "workspaceRoot": "../.." - } -} |