Update examples for 0.24.0 (#2740)

* removing Astro.resolve, adding sass dev dependencies

* updating tailwind example to use ESM style imports

* moving from `<style global>@import` to ESM imports

* updating lockfile to pick up examples sass deps

* chore(lint): ESLint fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Tony Sullivan 2022-03-09 21:52:31 +00:00 committed by GitHub
parent 43a5c06a93
commit 4b53a53c1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 81 additions and 86 deletions

View file

@ -1,4 +1,6 @@
---
import '../styles/global.css';
export interface Props {
title: string;
description: string;
@ -18,9 +20,6 @@ const { title, description, image, type, next, prev, canonicalURL } = Astro.prop
<meta name="description" content={description} />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet" />
<style global>
@import "../styles/global.css";
</style>
<!-- Sitemap -->
<link rel="sitemap" href="/sitemap.xml" />
<!-- RSS -->

View file

@ -1,5 +1,5 @@
---
import '../styles/blog.css';
export interface Props {
title: string;
@ -36,6 +36,3 @@ const { title, description, permalink } = Astro.props;
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=IBM+Plex+Sans:wght@400;700&display=swap" />
<style global>
@import "../styles/blog.css";
</style>

View file

@ -1,3 +1,9 @@
---
import '../styles/theme.css';
import '../styles/code.css';
import '../styles/index.css';
---
<!-- Global Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
@ -7,13 +13,6 @@
<link rel="sitemap" href="/sitemap.xml" />
<!-- Global CSS -->
<style global>
@import "../styles/theme.css";
@import "../styles/code.css";
@import "../styles/index.css";
</style>
<!-- Preload Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

View file

@ -1,4 +1,6 @@
---
// Style Imports
import '../styles/global.css';
// Component Imports
import { A, B as Renamed } from '../components';
import * as react from '../components/ReactCounter.jsx';
@ -17,9 +19,6 @@ import SvelteCounter from '../components/SvelteCounter.svelte';
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<style global>
@import "../styles/global.css";
</style>
</head>
<body>
<main>

View file

@ -10,6 +10,7 @@
},
"devDependencies": {
"@astrojs/renderer-svelte": "^0.5.1",
"astro": "^0.24.0-next.0"
"astro": "^0.24.0-next.0",
"sass": "^1.49.9"
}
}

View file

@ -1,4 +1,5 @@
---
import '../styles/global.scss';
const { title = 'Jeanine White: Personal Site', description = 'The personal site of Jeanine White' } = Astro.props;
---
@ -8,6 +9,5 @@ const { title = 'Jeanine White: Personal Site', description = 'The personal site
<title>{title}</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href={Astro.resolve('../styles/global.scss')} />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@200;400;700;900&display=swap" rel="stylesheet" />

View file

@ -10,6 +10,7 @@
},
"devDependencies": {
"@astrojs/renderer-preact": "^0.5.0",
"astro": "^0.24.0-next.0"
"astro": "^0.24.0-next.0",
"sass": "^1.49.9"
}
}

View file

@ -1,4 +1,7 @@
---
// Style Imports
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!
@ -20,10 +23,6 @@ let title = 'My Astro Site';
<title>{title}</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<style global>
@import "../styles/global.css";
@import "../styles/home.css";
</style>
<style>
header {

View file

@ -10,6 +10,7 @@
},
"devDependencies": {
"@astrojs/renderer-react": "^0.5.0",
"astro": "^0.24.0-next.0"
"astro": "^0.24.0-next.0",
"sass": "^1.49.9"
}
}

View file

@ -1,4 +1,5 @@
---
import '../styles/main.scss';
import Time from '../components/Time.jsx';
---
@ -6,7 +7,6 @@ import Time from '../components/Time.jsx';
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" href={Astro.resolve('../styles/main.scss')} />
<meta name="viewport" content="width=device-width" />
<title>Welcome to Astro</title>
</head>

View file

@ -1,4 +1,6 @@
---
import '../styles/global.css';
const { content } = Astro.props;
---
@ -9,9 +11,6 @@ const { content } = Astro.props;
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>{content.title}</title>
<style global>
@import "../styles/global.css";
</style>
<style>
.nav {
border-bottom: 1px solid #ccc;

View file

@ -1,4 +1,6 @@
---
import '../styles/global.css';
const { content } = Astro.props;
---
@ -9,10 +11,6 @@ const { content } = Astro.props;
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>{content.title}</title>
<style global>
@import "../styles/global.css";
</style>
</head>
<body>
<slot />

View file

@ -1,4 +1,6 @@
---
import '../styles/global.css';
const { content } = Astro.props;
---
@ -9,9 +11,6 @@ const { content } = Astro.props;
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>{content.title}</title>
<style global>
@import "../styles/global.css";
</style>
</head>
<body>
<slot />

View file

@ -1,4 +1,8 @@
---
// Style Imports
import '../styles/global.css';
import '../styles/home.css';
// Component Imports
import AdminsReact from '../components/AdminsReact.jsx';
import AdminsSvelte from '../components/AdminsSvelte.svelte';
@ -17,11 +21,6 @@ import AdminsSolid from '../components/AdminsSolid.jsx';
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<style global>
@import "../styles/global.css";
@import "../styles/home.css";
</style>
<style>
header {
display: flex;

View file

@ -1,8 +1,7 @@
---
// Component Imports
import Button from '../components/Button.astro';
// Imports the global styles to be inlined in the <head>
import styles from '../styles/global.css';
import '../styles/global.css';
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
@ -13,7 +12,6 @@ import styles from '../styles/global.css';
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>Astro + TailwindCSS</title>
<style set:html={styles}></style>
</head>
<body>

View file

@ -38,7 +38,7 @@ importers:
prettier: 2.5.1
pretty-bytes: 6.0.0
tiny-glob: 0.2.9
turbo: 1.1.5
turbo: 1.1.6
typescript: 4.5.2
examples/blog:
@ -211,17 +211,21 @@ importers:
specifiers:
'@astrojs/renderer-preact': ^0.5.0
astro: ^0.24.0-next.0
sass: ^1.49.9
devDependencies:
'@astrojs/renderer-preact': link:../../packages/renderers/renderer-preact
astro: link:../../packages/astro
sass: 1.49.9
examples/portfolio-svelte:
specifiers:
'@astrojs/renderer-svelte': ^0.5.1
astro: ^0.24.0-next.0
sass: ^1.49.9
devDependencies:
'@astrojs/renderer-svelte': link:../../packages/renderers/renderer-svelte
astro: link:../../packages/astro
sass: 1.49.9
examples/ssr:
specifiers:
@ -245,9 +249,11 @@ importers:
specifiers:
'@astrojs/renderer-react': ^0.5.0
astro: ^0.24.0-next.0
sass: ^1.49.9
devDependencies:
'@astrojs/renderer-react': link:../../packages/renderers/renderer-react
astro: link:../../packages/astro
sass: 1.49.9
examples/with-markdown:
specifiers:
@ -4348,7 +4354,7 @@ packages:
hasBin: true
dependencies:
caniuse-lite: 1.0.30001314
electron-to-chromium: 1.4.78
electron-to-chromium: 1.4.79
escalade: 3.1.1
node-releases: 2.0.2
picocolors: 1.0.0
@ -4991,8 +4997,8 @@ packages:
jake: 10.8.2
dev: true
/electron-to-chromium/1.4.78:
resolution: {integrity: sha512-o61+D/Lx7j/E0LIin/efOqeHpXhwi1TaQco9vUcRmr91m25SfZY6L5hWJDv/r+6kNjboFKgBw1LbfM0lbhuK6Q==}
/electron-to-chromium/1.4.79:
resolution: {integrity: sha512-nWfAxof87mGHkbORCwVRPst4FlSVdprOKS6dBMrcwn3sjwf8iHXEhsu1+FU5Psd7Ps3KKeBufAdfsPK5BmbSUg==}
/emmet/2.3.6:
resolution: {integrity: sha512-pLS4PBPDdxuUAmw7Me7+TcHbykTsBKN/S9XJbUOMFQrNv9MoshzyMFK/R57JBm94/6HSL4vHnDeEmxlC82NQ4A==}
@ -9329,119 +9335,119 @@ packages:
safe-buffer: 5.2.1
dev: true
/turbo-darwin-64/1.1.5:
resolution: {integrity: sha512-qdGMylQ408NmYhzuMmx+25W0iHFyFMRPO4579tDEv+WBiVDfAEYEzjajE4c+CQOLhd1aVEaPdSa+YhngQUgoDQ==}
/turbo-darwin-64/1.1.6:
resolution: {integrity: sha512-xzl79T7mPKaIGhMBCAzpTvXkbFNZaMyeOMsNXxVT5dTY+d3FwLFfbqHIoG1dH745TbH6i67bxtt70lKdQa+qdQ==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-darwin-arm64/1.1.5:
resolution: {integrity: sha512-mXU324d3vYzxRT9FSSkW9yG2BvFosd0f4DUvqy4qms8wzM6Yv9Aeo4zZTL86rF88UYGUkbiRaPQUeceb/QARVg==}
/turbo-darwin-arm64/1.1.6:
resolution: {integrity: sha512-r0D+Kfwcaqec5h9Xa4T/VD6mWZ2LQr+zOEBBL6UA15htgel06B2eXiGdjRiw4i7ieV80tEBEDdz9tSWJBhAL/Q==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-freebsd-64/1.1.5:
resolution: {integrity: sha512-qjjPTnZKOxw2x1Ito3yZAYDcwsCEg/5kYJwbPVvDn1jyXoxr3pUxTHUohroxQ6EmyxQ28qL7QpCVWDoQpDwrOQ==}
/turbo-freebsd-64/1.1.6:
resolution: {integrity: sha512-v5MJeRcyeCDF3La40TOub0+/OuGGFuLzlVHb4jYxthESbtLve1H23bDiL+4gCQgPYOsKMOvKQpuoMaKW2gxk7A==}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/turbo-freebsd-arm64/1.1.5:
resolution: {integrity: sha512-jYW+Th9Y6yEYevaFe7v3lFQoxyrpd8wX5KuuvqLazMRbNxvKgqTDmT7AbCOGJY5ejzqGnMlTGkQr8c3g3B8ndA==}
/turbo-freebsd-arm64/1.1.6:
resolution: {integrity: sha512-5gm3r+M5f/Idt/pggyCQ+MZSlaUdxUeb/4LtPohhWOoj4PYo1o5kwInaRlckr7uV36E4/npDvz9cDV96Pohejg==}
cpu: [arm64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/turbo-linux-32/1.1.5:
resolution: {integrity: sha512-c5I8tdR1jD8L8pJWk+rlO734bpWI1gwGdvNOaA/IGZxzOfDSn4CGoUErnUPgOadT8azi7lT9UPQf/pLfEvjCOw==}
/turbo-linux-32/1.1.6:
resolution: {integrity: sha512-dLc1Vd/LQP5n3NGLMf+cdaK99sMWvHdDvTUSrSwoYDy5fWFpUm0E12lAxRH3tikX2m7Kfcy2uY5xSJIuq5xzYQ==}
cpu: [ia32]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-64/1.1.5:
resolution: {integrity: sha512-BZAxLfIkEtQa7u+VPYpdeVVJH6ab4WwXv4oCrUDaZf2BseDUxr57y2ASAWNFsg40T3oXXt4Kcbdc5LibjWQdtQ==}
/turbo-linux-64/1.1.6:
resolution: {integrity: sha512-V4rb41yQUA+vPDgXc06oHmKbgrBUbwm09oRtjvmlIQU8zX8qujMPZIun8tGP4NuzErJXGzD3WDgj7VSsO23IIw==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-arm/1.1.5:
resolution: {integrity: sha512-X6J05gQSWTc2c/TCkOQdFLhr35pUjEExY6K8yanYs2QKgd4GvDHmxYaBZ+6f90qcIUHYpe++adDPJcuAUv+8ug==}
/turbo-linux-arm/1.1.6:
resolution: {integrity: sha512-zAaIa0+EhRYYkM51ruB1LCUqyeigK66A+KfXZ3Y9+aiKg7EYbDvuv+ReD4srLPKoIuAxR5dYlk5RVhSKejt2Cw==}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-arm64/1.1.5:
resolution: {integrity: sha512-8/yz5L0B6Jb0pNcvx/08LcPswizqggxQ0zlFEw+Oh9RAC+ZM5+X2YiMyKolvLCpkoRqrlKku0lmXH7mx6DWbig==}
/turbo-linux-arm64/1.1.6:
resolution: {integrity: sha512-QsE7gow3WxWXKwNWJX4DIJys6xc6Up4/icjdTZCZbglPLwuG2UiUzjJ2+beXxVU4EmpQF6NwKubHCtrs8m8/kQ==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-mips64le/1.1.5:
resolution: {integrity: sha512-K26bEFcLDGPkcaW7Eq4CMSxUbJf/x58aE92+0tONhrxXzamaBqTrSxPYlk/T8OoH7HxOvja2ctkpeI/NRAoIyw==}
/turbo-linux-mips64le/1.1.6:
resolution: {integrity: sha512-098DB9daXoI6LRCkuOv1Pqim+H4wXZrFza9Xd7zJIel1WmxEgNsHqWpSH5Jn2J92LbkWl+tfN1+myw4+a4ESfw==}
cpu: [mips64el]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-ppc64le/1.1.5:
resolution: {integrity: sha512-fr1/5yf8fe1BJiW/6Y9lmV+kxZZC3u3xvSBC5AXDSl9u3aJFZl96CRE9tOJbTZMaOVGxhplKD+EiHbjIxUnTrA==}
/turbo-linux-ppc64le/1.1.6:
resolution: {integrity: sha512-U5A1mnsGM994h/1VT4FbsV/bb+I0fgvkY5/TTX7MfA9Iwt0SxsNlh+Jgofe1svPz0CKEe6Hl2WQSGHTlBPJb5Q==}
cpu: [ppc64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-windows-32/1.1.5:
resolution: {integrity: sha512-K9LdIgQXJ7jL0aLJS0l2asJAH/vYBFP7qFzODiAcJ1EeKBjYqAVnIxFQrUN07lzNDtL9WK/aN5q0bJCDnhwTQw==}
/turbo-windows-32/1.1.6:
resolution: {integrity: sha512-0C+/EI11j8ABtI6O2n+NYL2osDI6moo7YL8pqiWbNrdEGI2KbeCTVQpruUH+GONsMov06pR4BouL9UT2jSpG0g==}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo-windows-64/1.1.5:
resolution: {integrity: sha512-c2Jkmw8yGZVz4opzEvB5HAf9XkA8CZBnorie46s44ec0FaNbcP9SCuUNvgAHxqDIHTGWC4A5PoPn0owkD3ss6A==}
/turbo-windows-64/1.1.6:
resolution: {integrity: sha512-O2kC+7+zuMjFIi6mpU1qz+Bv27TcHkkCczcDNVU29G52pm5lwj7BZ+/gu+EPJSnF5VrgdA6Oru6KVXPRS1q+Cg==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo/1.1.5:
resolution: {integrity: sha512-jXW8G4lr01/E/jS/66LYpEjwWFQAksC8TxR8gi3VGea7OeNj28l8zmXoY3IgT5H22MBnhmtOKV/GhsbPjI2Jrg==}
/turbo/1.1.6:
resolution: {integrity: sha512-pZTc6Sb5MtK/X/qhiDSssc8AZWoUoYf14ZqYjvDWg/aEtqgwYorVJqfRcj4XOXOqtVZ3gO/91eXwdyh/q2aQHA==}
hasBin: true
requiresBuild: true
optionalDependencies:
turbo-darwin-64: 1.1.5
turbo-darwin-arm64: 1.1.5
turbo-freebsd-64: 1.1.5
turbo-freebsd-arm64: 1.1.5
turbo-linux-32: 1.1.5
turbo-linux-64: 1.1.5
turbo-linux-arm: 1.1.5
turbo-linux-arm64: 1.1.5
turbo-linux-mips64le: 1.1.5
turbo-linux-ppc64le: 1.1.5
turbo-windows-32: 1.1.5
turbo-windows-64: 1.1.5
turbo-darwin-64: 1.1.6
turbo-darwin-arm64: 1.1.6
turbo-freebsd-64: 1.1.6
turbo-freebsd-arm64: 1.1.6
turbo-linux-32: 1.1.6
turbo-linux-64: 1.1.6
turbo-linux-arm: 1.1.6
turbo-linux-arm64: 1.1.6
turbo-linux-mips64le: 1.1.6
turbo-linux-ppc64le: 1.1.6
turbo-windows-32: 1.1.6
turbo-windows-64: 1.1.6
dev: true
/type-check/0.3.2: