From 3e756ae394dfec612c9a9cf5ed17edfb6234c23d Mon Sep 17 00:00:00 2001 From: Maher El Gamil Date: Thu, 28 May 2026 04:11:38 +0300 Subject: [PATCH] docs(install): correct npm source, document peer deps, fix tailwind path - Update install command description: npm registry, not GitHub Packages - Add 'Peer dependencies' section explaining auto-install vs explicit install - Manual-install tailwind @source now uses node_modules path (matches the vite + js_entry paths), so all three references point at one location --- docs/getting-started/installation.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 6779ac3..8c0ea90 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -24,7 +24,7 @@ php artisan monorail:install ``` This command will: -- Install the npm package from GitHub Packages +- Install the `monorailphp` npm package from the npm registry - Update `vite.config.ts` with the Monorail entry point - Publish the config file - Publish and run migrations @@ -35,6 +35,21 @@ Or install the npm package manually: npm install monorailphp ``` +### Peer dependencies + +Starting with `0.2.0`, Monorail's UI libraries (radix-ui, recharts, sonner, +react-day-picker, cmdk, date-fns, lucide-react, class-variance-authority, +clsx, tailwind-merge) are declared as `peerDependencies` so the host app's +versions stay authoritative and React is never duplicated. + +- **npm 7+** installs them automatically alongside `monorailphp`. +- **pnpm / yarn with strict peer resolution** require an explicit install: + + ```bash + npm install radix-ui recharts sonner react-day-picker cmdk date-fns \ + lucide-react class-variance-authority clsx tailwind-merge + ``` + ## Manual install If you prefer not to use the install command, follow these steps: @@ -43,7 +58,7 @@ If you prefer not to use the install command, follow these steps: ```css @import 'tailwindcss'; -@source '../../vendor/monorail/monorail/resources/js'; +@source '../../node_modules/monorailphp/resources/js'; ``` **2. Add the Monorail entry to `vite.config.ts`:**