From a3bee1477efe1da2107ea961095212f94ba45962 Mon Sep 17 00:00:00 2001 From: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> Date: Fri, 22 Sep 2023 08:47:40 -0600 Subject: [PATCH] Update: Improve manual install guide of `@astrojs/tailwind` integration (#8619) --- packages/integrations/tailwind/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/integrations/tailwind/README.md b/packages/integrations/tailwind/README.md index 8634d4b16..269931e1e 100644 --- a/packages/integrations/tailwind/README.md +++ b/packages/integrations/tailwind/README.md @@ -61,6 +61,26 @@ export default defineConfig({ }); ``` +Then, create a `tailwind.config.cjs` file in your project's root directory. You can use the following command to generate a basic configuration file for you: + +```sh +npx tailwindcss init +``` + +Finally, add this basic configuration to your `tailwind.config.cjs` file: + +```js ins={4} "content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}']" +// tailwind.config.cjs +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], + theme: { + extend: {}, + }, + plugins: [], +} +``` + ## Usage When you install the integration, Tailwind's utility classes should be ready to go right away. Head to the [Tailwind docs](https://tailwindcss.com/docs/utility-first) to learn how to use Tailwind, and if you see a utility class you want to try, add it to any HTML element to your project!