diff options
author | 2022-10-12 09:48:29 -0300 | |
---|---|---|
committer | 2022-10-12 09:48:29 -0300 | |
commit | f604ef6c694e88bcf2f22ce97a33bf131074326f (patch) | |
tree | c5579e65fb4c6c0ba854933998e5993137a9c0ce /examples/with-tailwindcss | |
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/with-tailwindcss')
-rw-r--r-- | examples/with-tailwindcss/package.json | 3 | ||||
-rw-r--r-- | examples/with-tailwindcss/src/components/Button.astro | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f85137fd2..4ffa96751 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,8 +11,9 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", "@astrojs/tailwind": "^2.0.2", + "@types/canvas-confetti": "^1.4.3", + "astro": "^1.4.7", "autoprefixer": "^10.4.7", "canvas-confetti": "^1.5.1", "postcss": "^8.4.14", diff --git a/examples/with-tailwindcss/src/components/Button.astro b/examples/with-tailwindcss/src/components/Button.astro index ef7af656b..79060699b 100644 --- a/examples/with-tailwindcss/src/components/Button.astro +++ b/examples/with-tailwindcss/src/components/Button.astro @@ -11,5 +11,9 @@ <script> import confetti from 'canvas-confetti'; - document.body.querySelector('button').addEventListener('click', () => confetti()); + const button = document.body.querySelector('button'); + + if (button) { + button.addEventListener('click', () => confetti()); + } </script> |