Skip to content

Commit

Permalink
Merge branch 'main' into fix/vercel-cjs-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanM04 authored Apr 15, 2022
2 parents d4f9608 + fa573f0 commit 76349ae
Show file tree
Hide file tree
Showing 87 changed files with 1,151 additions and 784 deletions.
5 changes: 0 additions & 5 deletions .changeset/clean-cherries-bow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quick-kangaroos-notice.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sharp-moose-perform.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/blog-multiple-authors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.1",
"astro": "^1.0.0-beta.8",
"astro": "^1.0.0-beta.12",
"sass": "^1.50.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"preact": "^10.7.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/component/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@example/my-component": "workspace:*",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"serve": "astro --root demo preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"devDependencies": {
"@astrojs/preact": "^0.1.1",
"@astrojs/react": "^0.1.0",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
2 changes: 1 addition & 1 deletion examples/env-vars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"alpinejs": "^3.9.6"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/lit": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@astrojs/solid-js": "^0.1.1",
"@astrojs/svelte": "^0.1.1",
"@astrojs/vue": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"preact": "^10.7.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.1.0",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/solid-js": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"solid-js": "^1.3.14"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/svelte": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"svelte": "^3.47.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/vue": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"vue": "^3.2.31"
Expand Down
4 changes: 2 additions & 2 deletions examples/integrations-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"@astrojs/partytown": "^0.1.2",
"@astrojs/react": "^0.1.0",
"@astrojs/sitemap": "^0.1.0",
"@astrojs/tailwind": "^0.1.2",
"@astrojs/tailwind": "^0.2.0",
"@astrojs/turbolinks": "^0.1.1",
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.1",
"astro": "^1.0.0-beta.8",
"astro": "^1.0.0-beta.12",
"sass": "^1.50.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@astrojs/node": "^0.1.1",
"@astrojs/svelte": "^0.1.1",
"astro": "^1.0.0-beta.8",
"astro": "^1.0.0-beta.12",
"concurrently": "^7.1.0",
"lightcookie": "^1.0.25",
"unocss": "^0.15.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.8"
"astro": "^1.0.0-beta.12"
}
}
File renamed without changes
9 changes: 9 additions & 0 deletions examples/starter/src/components/Logo.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
// Export a "Props" interface to .
export interface Props {
height?: number,
width?: number,
}
const {height = 80, width = 60 } = Astro.props;
---
<img height={height} width={width} src="/logo.svg" alt="Astro logo">
84 changes: 0 additions & 84 deletions examples/starter/src/components/Tour.astro

This file was deleted.

28 changes: 28 additions & 0 deletions examples/starter/src/content/Tour.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
├── public/
│ ├── logo.svg
│ └── favicon.ico
├── src/
│ ├── components/
│ │ └── Logo.astro
│ ├── content/
│ │ └── Tour.md
│ └── 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.

## 👀 Want to learn more?

Check out the [Astro Documentation](https://github.com/withastro/astro) site or jump into our [Discord server](https://astro.build/chat).
38 changes: 31 additions & 7 deletions examples/starter/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
// Style Imports
import {Content as TourContent} from '../content/Tour.md';
import Logo from '../components/Logo.astro';
import '../styles/global.css';
import '../styles/home.css';
// Component Imports
import Tour from '../components/Tour.astro';
// You can import components from any supported Framework here!
/* ASTRO:COMPONENT_IMPORTS */
// Component Script:
Expand All @@ -31,25 +29,51 @@ let title = 'My Astro Site';
gap: 1em;
max-width: min(100%, 68ch);
}
article {
padding-top: 2em;
line-height: 1.5;
display: flex;
flex-direction: column;
gap: 1em;
max-width: 70ch;
}
.banner {
text-align: center;
font-size: 1.2rem;
background: var(--color-light);
padding: 1em 1.5em;
padding-left: 0.75em;
border-radius: 4px;
}
</style>
<style is:global>
pre {
padding: 1rem;
}
</style>
</head>
<body>
<main>
<header>
<div>
<img width="60" height="80" src="/assets/logo.svg" alt="Astro logo">
<Logo width={60} height={80} />
<h1>Welcome to <a href="https://astro.build/">Astro</a></h1>
</div>
</header>

<Tour />
<article>
<div class="banner">
<p><strong>🧑‍🚀 Seasoned astronaut?</strong> Delete this template and have fun!</p>
</div>
<TourContent />
</article>

<!--
You can also use imported framework components directly in your markup!
Note: by default, these components are NOT interactive on the client.
The `:visible` directive tells Astro to make it interactive.
The `client:visible` directive tells Astro to make it interactive.
See https://docs.astro.build/core-concepts/component-hydration/
Expand Down
2 changes: 1 addition & 1 deletion examples/subpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.1.0",
"astro": "^1.0.0-beta.8",
"astro": "^1.0.0-beta.12",
"sass": "^1.50.0"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 76349ae

Please sign in to comment.