Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/node/scripts/move-artifacts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ for (let file of await fs.readdir(tailwindcssOxideRoot)) {
)
console.log(`Moved ${file} to npm/wasm32-wasi`)
}

60 changes: 30 additions & 30 deletions packages/@tailwindcss-postcss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,29 @@ By default, this plugin detects whether or not the CSS is being built for produc
If you want to always enable or disable Lightning CSS the `optimize` option may be used:

```js
import tailwindcss from "@tailwindcss/postcss"
import tailwindcss from '@tailwindcss/postcss'

export default {
plugins: [
tailwindcss({
// Enable or disable Lightning CSS
optimize: false,
})
]
plugins: [
tailwindcss({
// Enable or disable Lightning CSS
optimize: false,
}),
],
}
```

It's also possible to keep Lightning CSS enabled but disable minification:

```js
import tailwindcss from "@tailwindcss/postcss"
import tailwindcss from '@tailwindcss/postcss'

export default {
plugins: [
tailwindcss({
optimize: { minify: false },
})
]
plugins: [
tailwindcss({
optimize: { minify: false },
}),
],
}
```

Expand All @@ -95,32 +95,32 @@ Our PostCSS plugin can rewrite `url(…)`s for you since it also handles `@impor
In some situations the bundler or framework you're using may provide this feature itself. In this case you can set `transformAssetUrls` to `false` to disable this feature:

```js
import tailwindcss from "@tailwindcss/postcss"
import tailwindcss from '@tailwindcss/postcss'

export default {
plugins: [
tailwindcss({
// Disable `url(…)` rewriting
transformAssetUrls: false,

// Enable `url(…)` rewriting (the default)
transformAssetUrls: true,
})
]
plugins: [
tailwindcss({
// Disable `url(…)` rewriting
transformAssetUrls: false,

// Enable `url(…)` rewriting (the default)
transformAssetUrls: true,
}),
],
}
```

You may also pass options to `optimize` to enable Lighting CSS but prevent minification:

```js
import tailwindcss from "@tailwindcss/postcss"
import tailwindcss from '@tailwindcss/postcss'

export default {
plugins: [
tailwindcss({
// Enables Lightning CSS but disables minification
optimize: { minify: false },
})
]
plugins: [
tailwindcss({
// Enables Lightning CSS but disables minification
optimize: { minify: false },
}),
],
}
```
4 changes: 4 additions & 0 deletions packages/@tailwindcss-upgrade/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ async function run() {
}
}

info(`Upgrading from Tailwind CSS ${highlight(`v${version.installedTailwindVersion(base)}`)}`, {
prefix: '↳ ',
})

{
// Stylesheet migrations

Expand Down
2 changes: 1 addition & 1 deletion packages/@tailwindcss-upgrade/src/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ let cache = new DefaultMap((base) => {
return tailwindVersion
})

function installedTailwindVersion(base = process.cwd()): string {
export function installedTailwindVersion(base = process.cwd()): string {
return cache.get(base)
}