diff options
author | 2022-10-12 09:48:29 -0300 | |
---|---|---|
committer | 2022-10-12 09:48:29 -0300 | |
commit | f604ef6c694e88bcf2f22ce97a33bf131074326f (patch) | |
tree | c5579e65fb4c6c0ba854933998e5993137a9c0ce /examples/ssr/src | |
parent | 640ce72d336101ff3bc02a596373ddbf1713e5db (diff) | |
download | astro-f604ef6c694e88bcf2f22ce97a33bf131074326f.tar.gz astro-f604ef6c694e88bcf2f22ce97a33bf131074326f.tar.zst astro-f604ef6c694e88bcf2f22ce97a33bf131074326f.zip |
Run astro check on all examples in CI (#5022)
* Run astro check on all examples in CI
* Output stderr
* Build Astro before running checks
* Making things faster + colors
* Fix errors inside examples
* Add congrats message
* Revert unentional change to tsconfigs
* Remove more unneeded changes
Diffstat (limited to 'examples/ssr/src')
-rw-r--r-- | examples/ssr/src/api.ts | 2 | ||||
-rw-r--r-- | examples/ssr/src/components/ProductListing.astro | 6 | ||||
-rw-r--r-- | examples/ssr/src/components/TextDecorationSkip.astro | 4 | ||||
-rw-r--r-- | examples/ssr/src/pages/index.astro | 5 |
4 files changed, 12 insertions, 5 deletions
diff --git a/examples/ssr/src/api.ts b/examples/ssr/src/api.ts index 939130506..32b48e220 100644 --- a/examples/ssr/src/api.ts +++ b/examples/ssr/src/api.ts @@ -1,4 +1,4 @@ -interface Product { +export interface Product { id: number; name: string; price: number; diff --git a/examples/ssr/src/components/ProductListing.astro b/examples/ssr/src/components/ProductListing.astro index fb3cff00f..96b6ea581 100644 --- a/examples/ssr/src/components/ProductListing.astro +++ b/examples/ssr/src/components/ProductListing.astro @@ -1,4 +1,10 @@ --- +import type { Product } from '../api'; + +interface Props { + products: Product[]; +} + const { products } = Astro.props; --- diff --git a/examples/ssr/src/components/TextDecorationSkip.astro b/examples/ssr/src/components/TextDecorationSkip.astro index ccd866a09..524732d04 100644 --- a/examples/ssr/src/components/TextDecorationSkip.astro +++ b/examples/ssr/src/components/TextDecorationSkip.astro @@ -1,4 +1,8 @@ --- +interface Props { + text: string; +} + const { text } = Astro.props; const words = text.split(' '); const last = words.length - 1; diff --git a/examples/ssr/src/pages/index.astro b/examples/ssr/src/pages/index.astro index 23a4c2721..1ce70bc81 100644 --- a/examples/ssr/src/pages/index.astro +++ b/examples/ssr/src/pages/index.astro @@ -19,16 +19,13 @@ const products = await getProducts(Astro.request); .product-listing-title { text-align: center; } - - .product-listing { - } </style> </head> <body> <Header /> <Container tag="main"> - <ProductListing products={products} class="product-listing"> + <ProductListing products={products}> <h2 class="product-listing-title" slot="title">Product Listing</h2> </ProductListing> </Container> |