From 6bd59f60514c39a130d84e8e082436594609149e Mon Sep 17 00:00:00 2001 From: selemondev Date: Mon, 18 Nov 2024 21:56:04 +0300 Subject: [PATCH] docs: update documentation with necessary changes --- .../www/src/content/docs/installation/nuxt.md | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/apps/www/src/content/docs/installation/nuxt.md b/apps/www/src/content/docs/installation/nuxt.md index 851ba668..949ce120 100644 --- a/apps/www/src/content/docs/installation/nuxt.md +++ b/apps/www/src/content/docs/installation/nuxt.md @@ -27,28 +27,6 @@ If you encounter the error `ERROR: Cannot read properties of undefined (reading npm install -D typescript ``` -### Install TailwindCSS module - -```bash -npx nuxi@latest module add @nuxtjs/tailwindcss -``` - -Alternatively, you can manually add `@nuxtjs/tailwindcss` using your dependency manager - -```bash -npm install --save-dev @nuxtjs/tailwindcss -``` - -and then to the `modules` section of `nuxt.config.{ts,js}` - -```ts -export default defineNuxtConfig({ - modules: [ - '@nuxtjs/tailwindcss' - ] -}) -``` - ### Add `Nuxt` module
@@ -56,7 +34,7 @@ export default defineNuxtConfig({ - Install the package below. +Installing the `shadcn-nuxt` module automatically installs and configures `@nuxtjs/tailwindcss` and `@nuxtjs/color-mode` modules. ```bash npx nuxi@latest module add shadcn-nuxt @@ -177,6 +155,35 @@ declare module '@nuxt/schema' { shadcn?: ShadcnVueOptions; } } +``` + +### Install TailwindCss + + ```bash +npx nuxi@latest module add @nuxtjs/tailwindcss + ``` + +If not configured automatically in the `nuxt.config.ts` file, configure it as shown below: + +```ts +export default defineNuxtConfig({ + modules: ['@nuxtjs/tailwindcss'], +}) +``` + +### Install Color Mode + + ```bash +npx nuxi module add color-mode + ``` + +If not configured automatically in the `nuxt.config.ts` file, configure it as shown below: + +```ts +export default defineNuxtConfig({ + modules: ['...', '@nuxtjs/color-mode'], + classSuffix: '' +}) ``` @@ -186,7 +193,7 @@ declare module '@nuxt/schema' { ```ts export default defineNuxtConfig({ - modules: ['@nuxtjs/tailwindcss', 'shadcn-nuxt'], + modules: ['shadcn-nuxt'], shadcn: { /** * Prefix for all the imported component