From c302edb8206aa0cfa9e3f74ea1955a0ec9aace4c Mon Sep 17 00:00:00 2001 From: Phillip Mwaniki Nzuli Date: Fri, 26 Apr 2024 16:22:21 +0300 Subject: [PATCH] added pnpm to install command --- src/Console/Commands/MaryInstallCommand.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Console/Commands/MaryInstallCommand.php b/src/Console/Commands/MaryInstallCommand.php index 3eae5327..84ada47e 100644 --- a/src/Console/Commands/MaryInstallCommand.php +++ b/src/Console/Commands/MaryInstallCommand.php @@ -25,7 +25,7 @@ public function handle() // Install Volt ? $shouldInstallVolt = $this->askForVolt(); - //Yarn or Npm ? + //Yarn or Npm or Bun or Pnpm ? $packageManagerCommand = $this->askForPackageInstaller(); // Install Livewire/Volt @@ -44,7 +44,7 @@ public function handle() Artisan::call('view:clear'); $this->info("\n"); - $this->info("✅ Done! Run `yarn dev` or `npm run dev` or `bun run dev`"); + $this->info("✅ Done! Run `yarn dev` or `npm run dev` or `bun run dev` or `pnpm dev`"); $this->info("🌟 Give it a star: https://github.com/robsontenorio/mary"); $this->info("❤️ Sponsor this project: https://github.com/sponsors/robsontenorio\n"); } @@ -215,6 +215,7 @@ public function askForPackageInstaller(): string $yarn = Process::run($findCommand . ' yarn')->output(); $npm = Process::run($findCommand . ' npm')->output(); $bun = Process::run($findCommand . ' bun')->output(); + $pnpm = Process::run($findCommand . ' pnpm')->output(); $options = []; @@ -230,8 +231,12 @@ public function askForPackageInstaller(): string $options = array_merge($options, ['bun i -D' => 'bun']); } + if (Str::of($pnpm)->isNotEmpty()) { + $options = array_merge($options, ['pnpm i -D' => 'pnpm']); + } + if (count($options) == 0) { - $this->error("You need yarn or npm or bun installed."); + $this->error("You need yarn or npm or bun or pnpm installed."); exit; }