Skip to content

Commit

Permalink
add installers for react/vue sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmanders committed Mar 3, 2025
1 parent d3f0aa0 commit 89ce99a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Console/ReactCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace CloudinaryLabs\CloudinaryLaravel\Console;

use Illuminate\Console\Command;
use Symfony\Component\Process\Process;

class ReactCommand extends Command
{
Expand All @@ -15,5 +16,15 @@ class ReactCommand extends Command
public function handle()
{
$this->info('Installing Cloudinary React components...');

$process = new Process(['npm', 'install', '@cloudinary/react', '@cloudinary/url-gen']);

$process->run(function ($type, $line) {
$this->output->write($line);
});

$this->line(' ');
$this->info('Cloudinary React components installed successfully.');
$this->line('Read getting started: https://cloudinary.com/documentation/react_quick_start');
}
}
11 changes: 11 additions & 0 deletions src/Console/VueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace CloudinaryLabs\CloudinaryLaravel\Console;

use Illuminate\Console\Command;
use Symfony\Component\Process\Process;

class VueCommand extends Command
{
Expand All @@ -15,5 +16,15 @@ class VueCommand extends Command
public function handle()
{
$this->info('Installing Cloudinary Vue components...');

$process = new Process(['npm', 'install', '@cloudinary/vue', '@cloudinary/url-gen']);

$process->run(function ($type, $line) {
$this->output->write($line);
});

$this->line(' ');
$this->info('Cloudinary Vue components installed successfully.');
$this->line('Read getting started: https://cloudinary.com/documentation/vue_quick_start');
}
}

0 comments on commit 89ce99a

Please sign in to comment.