diff --git a/crates/node/scripts/move-artifacts.mjs b/crates/node/scripts/move-artifacts.mjs index 10a87cc1580e..faf4728efc0a 100644 --- a/crates/node/scripts/move-artifacts.mjs +++ b/crates/node/scripts/move-artifacts.mjs @@ -35,4 +35,3 @@ for (let file of await fs.readdir(tailwindcssOxideRoot)) { ) console.log(`Moved ${file} to npm/wasm32-wasi`) } - diff --git a/packages/@tailwindcss-postcss/README.md b/packages/@tailwindcss-postcss/README.md index 1d0900f4af04..f824c2a061b9 100644 --- a/packages/@tailwindcss-postcss/README.md +++ b/packages/@tailwindcss-postcss/README.md @@ -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 }, + }), + ], } ``` @@ -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 }, + }), + ], } ``` diff --git a/packages/@tailwindcss-upgrade/src/index.ts b/packages/@tailwindcss-upgrade/src/index.ts index bab07bf1612e..4c50330846cf 100644 --- a/packages/@tailwindcss-upgrade/src/index.ts +++ b/packages/@tailwindcss-upgrade/src/index.ts @@ -58,6 +58,10 @@ async function run() { } } + info(`Upgrading from Tailwind CSS ${highlight(`v${version.installedTailwindVersion(base)}`)}`, { + prefix: '↳ ', + }) + { // Stylesheet migrations diff --git a/packages/@tailwindcss-upgrade/src/utils/version.ts b/packages/@tailwindcss-upgrade/src/utils/version.ts index 6794b1a81aeb..6dab20a3546e 100644 --- a/packages/@tailwindcss-upgrade/src/utils/version.ts +++ b/packages/@tailwindcss-upgrade/src/utils/version.ts @@ -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) }