diff options
Diffstat (limited to 'examples/fast-build/src')
-rw-r--r-- | examples/fast-build/src/components/Counter.vue | 24 | ||||
-rw-r--r-- | examples/fast-build/src/components/ExternalHoisted.astro | 2 | ||||
-rw-r--r-- | examples/fast-build/src/components/Greeting.vue | 20 | ||||
-rw-r--r-- | examples/fast-build/src/components/InlineHoisted.astro | 13 | ||||
-rw-r--r-- | examples/fast-build/src/images/penguin.jpg | bin | 12013 -> 0 bytes | |||
-rw-r--r-- | examples/fast-build/src/images/random.jpg | bin | 14553 -> 0 bytes | |||
-rw-r--r-- | examples/fast-build/src/pages/[pokemon].astro | 20 | ||||
-rw-r--r-- | examples/fast-build/src/pages/index.astro | 75 | ||||
-rw-r--r-- | examples/fast-build/src/scripts/external-hoist.ts | 2 | ||||
-rw-r--r-- | examples/fast-build/src/styles/_global.scss | 1 | ||||
-rw-r--r-- | examples/fast-build/src/styles/global.css | 3 |
11 files changed, 0 insertions, 160 deletions
diff --git a/examples/fast-build/src/components/Counter.vue b/examples/fast-build/src/components/Counter.vue deleted file mode 100644 index 599bcf615..000000000 --- a/examples/fast-build/src/components/Counter.vue +++ /dev/null @@ -1,24 +0,0 @@ -<template> - <div id="vue" class="counter"> - <button @click="subtract()">-</button> - <pre>{{ count }}</pre> - <button @click="add()">+</button> - </div> -</template> - -<script> -import { ref } from 'vue'; -export default { - setup() { - const count = ref(0); - const add = () => (count.value = count.value + 1); - const subtract = () => (count.value = count.value - 1); - - return { - count, - add, - subtract, - }; - }, -}; -</script> diff --git a/examples/fast-build/src/components/ExternalHoisted.astro b/examples/fast-build/src/components/ExternalHoisted.astro deleted file mode 100644 index a9e7d2ae2..000000000 --- a/examples/fast-build/src/components/ExternalHoisted.astro +++ /dev/null @@ -1,2 +0,0 @@ -<div id="external-hoist"></div> -<script type="module" hoist src="/src/scripts/external-hoist"></script> diff --git a/examples/fast-build/src/components/Greeting.vue b/examples/fast-build/src/components/Greeting.vue deleted file mode 100644 index a94f586bf..000000000 --- a/examples/fast-build/src/components/Greeting.vue +++ /dev/null @@ -1,20 +0,0 @@ -<script> -export default { - data() { - return { - greeting: 'Hello World!', - }; - }, -}; -</script> - -<template> - <p class="greeting">{{ greeting }}</p> -</template> - -<style> -.greeting { - color: red; - font-weight: bold; -} -</style> diff --git a/examples/fast-build/src/components/InlineHoisted.astro b/examples/fast-build/src/components/InlineHoisted.astro deleted file mode 100644 index ba6c0ab4d..000000000 --- a/examples/fast-build/src/components/InlineHoisted.astro +++ /dev/null @@ -1,13 +0,0 @@ -<script type="module" hoist> - import { h, render } from 'preact'; - - - const mount = document.querySelector('#inline-hoist'); - - function App() { - return h('strong', null, 'Hello again'); - } - - render(h(App), mount); -</script> -<div id="inline-hoist"></div> diff --git a/examples/fast-build/src/images/penguin.jpg b/examples/fast-build/src/images/penguin.jpg Binary files differdeleted file mode 100644 index 6c5dcd37a..000000000 --- a/examples/fast-build/src/images/penguin.jpg +++ /dev/null diff --git a/examples/fast-build/src/images/random.jpg b/examples/fast-build/src/images/random.jpg Binary files differdeleted file mode 100644 index 291883837..000000000 --- a/examples/fast-build/src/images/random.jpg +++ /dev/null diff --git a/examples/fast-build/src/pages/[pokemon].astro b/examples/fast-build/src/pages/[pokemon].astro deleted file mode 100644 index ea01cc4f7..000000000 --- a/examples/fast-build/src/pages/[pokemon].astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -import Greeting from '../components/Greeting.vue'; - -export async function getStaticPaths() { - const response = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=2000`); - const result = await response.json(); - const allPokemon = result.results; - return allPokemon.map(pokemon => ({params: {pokemon: pokemon.name}, props: {pokemon}})); -} ---- -<html lang="en"> - <head> - <title>Hello</title> - </head> - - <body> - <h1>{Astro.props.pokemon.name}</h1> - <Greeting client:load /> - </body> -</html>
\ No newline at end of file diff --git a/examples/fast-build/src/pages/index.astro b/examples/fast-build/src/pages/index.astro deleted file mode 100644 index 1ae672da6..000000000 --- a/examples/fast-build/src/pages/index.astro +++ /dev/null @@ -1,75 +0,0 @@ ---- -import imgUrl from '../images/penguin.jpg'; -import grayscaleUrl from '../images/random.jpg?grayscale=true'; -import Greeting from '../components/Greeting.vue'; -import Counter from '../components/Counter.vue'; -// import { Code } from 'astro/components'; -import InlineHoisted from '../components/InlineHoisted.astro'; -import ExternalHoisted from '../components/ExternalHoisted.astro'; ---- - -<html> - <head> - <title>Demo app</title> - <style> - h1 { - color: salmon; - } - </style> - <style lang="scss"> - @import "../styles/_global.scss"; - h2 { - color: $color; - } - </style> - <style define:vars={{ color: 'blue' }}> - .define-vars h1 { - color: var(--color); - } - </style> - </head> - <body> - <section> - <h1>Images</h1> - - <h2>Imported in JS</h2> - <img src={imgUrl} /> - </section> - - <section> - <h1>Component CSS</h1> - <Greeting /> - </section> - - <section> - <h1>ImageTools</h1> - <img src={grayscaleUrl} /> - </section> - - <section> - <h1>Astro components</h1> - <!-- <Code lang="css" code={`body { - color: salmon; -}`} /> --> - </section> - - <section> - <h1>Hydrated component</h1> - <Counter client:idle /> - </section> - - <section> - <h1>Hoisted scripts</h1> - <InlineHoisted /> - <ExternalHoisted /> - </section> - - <section class="define-vars"> - <h1>define:vars</h1> - <h2></h2> - <script define:vars={{ color: 'blue' }}> - document.querySelector('.define-vars h2').textContent = `Color: ${color}`; - </script> - </section> -</body> -</html> diff --git a/examples/fast-build/src/scripts/external-hoist.ts b/examples/fast-build/src/scripts/external-hoist.ts deleted file mode 100644 index ff7ee0bcf..000000000 --- a/examples/fast-build/src/scripts/external-hoist.ts +++ /dev/null @@ -1,2 +0,0 @@ -const el = document.querySelector('#external-hoist'); -el.textContent = `This was loaded externally`; diff --git a/examples/fast-build/src/styles/_global.scss b/examples/fast-build/src/styles/_global.scss deleted file mode 100644 index 27620a746..000000000 --- a/examples/fast-build/src/styles/_global.scss +++ /dev/null @@ -1 +0,0 @@ -$color: tan; diff --git a/examples/fast-build/src/styles/global.css b/examples/fast-build/src/styles/global.css deleted file mode 100644 index ab5ca9bfe..000000000 --- a/examples/fast-build/src/styles/global.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - background: lightcoral; -} |