Skip to content

Commit

Permalink
add svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmanders committed Mar 3, 2025
1 parent 89ce99a commit a014556
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 25 deletions.
19 changes: 0 additions & 19 deletions src/Console/LivewireCommand.php

This file was deleted.

6 changes: 3 additions & 3 deletions src/Console/ReactCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ class ReactCommand extends Command
{
protected $signature = 'cloudinary:react';

protected $description = 'Install the React components';
protected $description = 'Install the React SDK';

protected $hidden = true;

public function handle()
{
$this->info('Installing Cloudinary React components...');
$this->info('Installing Cloudinary React SDK...');

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

Expand All @@ -24,7 +24,7 @@ public function handle()
});

$this->line(' ');
$this->info('Cloudinary React components installed successfully.');
$this->info('Cloudinary React SDK installed successfully.');
$this->line('Read getting started: https://cloudinary.com/documentation/react_quick_start');
}
}
30 changes: 30 additions & 0 deletions src/Console/SvelteCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace CloudinaryLabs\CloudinaryLaravel\Console;

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

class SvelteCommand extends Command
{
protected $signature = 'cloudinary:svelte';

protected $description = 'Install the Svelte SDK';

protected $hidden = true;

public function handle()
{
$this->info('Installing Cloudinary Svelte SDK...');

$process = new Process(['npm', 'install', 'svelte-cloudinary']);

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

$this->line(' ');
$this->info('Cloudinary Svelte SDK installed successfully.');
$this->line('Read getting started: https://svelte.cloudinary.dev/get-started');
}
}
6 changes: 3 additions & 3 deletions src/Console/VueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ class VueCommand extends Command
{
protected $signature = 'cloudinary:vue';

protected $description = 'Install the Vue components';
protected $description = 'Install the Vue SDK';

protected $hidden = true;

public function handle()
{
$this->info('Installing Cloudinary Vue components...');
$this->info('Installing Cloudinary Vue SDK...');

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

Expand All @@ -24,7 +24,7 @@ public function handle()
});

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

0 comments on commit a014556

Please sign in to comment.