Skip to content

Commit

Permalink
Merge pull request #40 from omiba/master
Browse files Browse the repository at this point in the history
Fix PresetCommand
  • Loading branch information
deeshrestha authored May 9, 2020
2 parents 5d0d73f + 8fbca20 commit 9e07525
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"keywords": ["laravel", "preset", "bulma"],
"license": "MIT",
"require": {
"laravel/framework": "^7.0"
"laravel/framework": "^7.0",
"laravel/ui": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 3 additions & 4 deletions src/BulmaPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
use Artisan;
use Illuminate\Support\Arr;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\Console\Presets\Preset;
use Laravel\Ui\UiCommand;

class BulmaPreset extends Preset

class BulmaPreset extends UICommand
{
/**
* Install the preset.
Expand All @@ -15,7 +16,6 @@ class BulmaPreset extends Preset
*/
public static function install($withAuth = false)
{
static::updatePackages();
static::updateSass();
static::updateBootstrapping();

Expand All @@ -28,7 +28,6 @@ public static function install($withAuth = false)
static::updateWelcomePage();
}

static::removeNodeModules();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/BulmaPresetServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace LaravelFrontendPresets\BulmaPreset;

use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\Console\PresetCommand;
use Laravel\Ui\UiCommand;

class BulmaPresetServiceProvider extends ServiceProvider
{
Expand All @@ -13,13 +13,13 @@ class BulmaPresetServiceProvider extends ServiceProvider
*/
public function boot()
{
PresetCommand::macro('bulma', function ($command) {
UiCommand::macro('bulma', function ($command) {
BulmaPreset::install(false);
$command->info('Bulma scaffolding installed successfully.');
$command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
});

PresetCommand::macro('bulma-auth', function ($command) {
UiCommand::macro('bulma-auth', function ($command) {
BulmaPreset::install(true);
$command->info('Bulma scaffolding with Auth views installed successfully.');
$command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
Expand Down

0 comments on commit 9e07525

Please sign in to comment.