-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: HiDeoo <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
- Loading branch information
1 parent
db252e0
commit 2ed4bd9
Showing
40 changed files
with
547 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@astrojs/tailwind': major | ||
--- | ||
|
||
Deprecates the integration | ||
|
||
Tailwind CSS now offers a Vite plugin which is the preferred way to use Tailwind 4 in Astro. Please uninstall `@astrojs/tailwind` and follow the [Tailwind documentation for manual installation](https://tailwindcss.com/docs/installation/framework-guides/astro). | ||
|
||
This updated major version is only provided as a convenience for existing projects until they are able to migrate to the new plugin. It offers no additional functionality and is no longer recommended, but may continue to be used in your projects until it is removed entirely. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Updates `astro add tailwind` to add the `@tailwindcss/vite` plugin instead of the `@astrojs/tailwind` integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
// @ts-check | ||
import { defineConfig } from 'astro/config'; | ||
import tailwind from '@astrojs/tailwind'; | ||
import tailwindcss from '@tailwindcss/vite'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind()], | ||
vite: { | ||
plugins: [tailwindcss()] | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
import '../styles/global.css'; | ||
const { content } = Astro.props; | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
import '../styles/global.css'; | ||
// Component Imports | ||
import Button from '../components/Button.astro'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "tailwindcss"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/astro/e2e/fixtures/tailwindcss/src/styles/global.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@import 'tailwindcss'; | ||
|
||
@theme { | ||
--color-dawn: #f3e9fa; | ||
--color-dusk: #514375; | ||
--color-midnight: #31274a; | ||
} |
14 changes: 0 additions & 14 deletions
14
packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
packages/astro/test/fixtures/astro-scripts/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import { fileURLToPath } from 'node:url'; | ||
import tailwind from '@astrojs/tailwind'; | ||
import { defineConfig } from 'astro/config'; | ||
import tailwindcss from '@tailwindcss/vite'; | ||
|
||
export default defineConfig({ | ||
integrations: [ | ||
tailwind({ | ||
configFile: fileURLToPath(new URL('./tailwind.config.cjs', import.meta.url)), | ||
}), | ||
], | ||
vite: { | ||
plugins: [tailwindcss()] | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/external-page.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
import './styles/global.css'; | ||
--- | ||
|
||
<html lang="en"> | ||
|
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/pages/external-no-hoist-classic.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
import '../styles/global.css'; | ||
import NoHoistClassic from '../components/NoHoistClassic.astro'; | ||
--- | ||
|
||
|
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/pages/external-no-hoist.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
import '../styles/global.css'; | ||
import NoHoistModule from '../components/NoHoistModule.astro'; | ||
--- | ||
|
||
|
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/pages/external.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/pages/glob.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/astro/test/fixtures/astro-scripts/src/pages/inline-in-page.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
--- | ||
import '../styles/global.css'; | ||
--- | ||
|
||
<html> | ||
<head> | ||
|
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/pages/inline.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
import '../styles/global.css'; | ||
import Inline from '../components/Inline.astro'; | ||
--- | ||
|
||
|
3 changes: 3 additions & 0 deletions
3
packages/astro/test/fixtures/astro-scripts/src/pages/with-styles.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
--- | ||
import '../styles/global.css'; | ||
--- | ||
|
||
<html> | ||
<head> | ||
|
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/astro-scripts/src/styles/global.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import 'tailwindcss'; |
8 changes: 0 additions & 8 deletions
8
packages/astro/test/fixtures/astro-scripts/tailwind.config.cjs
This file was deleted.
Oops, something went wrong.
11 changes: 4 additions & 7 deletions
11
packages/astro/test/fixtures/middleware-tailwind/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import { fileURLToPath } from 'node:url'; | ||
import tailwind from '@astrojs/tailwind'; | ||
import { defineConfig } from 'astro/config'; | ||
import tailwindcss from "@tailwindcss/vite" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [ | ||
tailwind({ | ||
configFile: fileURLToPath(new URL('./tailwind.config.cjs', import.meta.url)), | ||
}), | ||
], | ||
vite: { | ||
plugins: [tailwindcss()], | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/astro/test/fixtures/middleware-tailwind/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
import '../styles/global.css'; | ||
--- | ||
|
||
<h1 class="text-blue-500 text-2xl font-bold">Hello world</h1> | ||
|
||
<style> | ||
|
1 change: 1 addition & 0 deletions
1
packages/astro/test/fixtures/middleware-tailwind/src/styles/global.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import 'tailwindcss'; |
Oops, something went wrong.