Skip to content

Commit fc717e3

Browse files
author
M. Rizky Hidayat
committed
Fix missing package and add command info
1 parent 72e8e1d commit fc717e3

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

resources/js/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ window.jQuery = window.$ = require('jquery');
1515
window.moment = require('moment');
1616

1717
require('popper.js');
18-
require('assets/resources/js/bootstrap');
18+
require('bootstrap');
1919
require('jquery.nicescroll');
2020

2121
require('./stisla/stisla');

src/StislaPreset.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Filesystem\Filesystem;
66
use Laravel\Ui\Presets\Preset;
7+
use Laravel\Ui\UiCommand;
78

89
class StislaPreset extends Preset
910
{
@@ -12,14 +13,18 @@ class StislaPreset extends Preset
1213
/**
1314
* Install the preset.
1415
*
16+
* @param UiCommand $command
1517
* @return void
1618
*/
17-
public static function install()
19+
public static function install(UiCommand $command)
1820
{
1921
static::updatePackages();
2022

23+
$command->info('Updating Resource JS');
2124
static::updateScripts();
25+
$command->info('Updating Resource SASS');
2226
static::updateStyles();
27+
$command->info('Updating Resource Layouts');
2328
static::updateLayoutViews();
2429

2530
static::removeNodeModules();
@@ -35,10 +40,10 @@ protected static function updatePackageArray(array $packages)
3540
{
3641
return [
3742
'@fortawesome/fontawesome-free' => '^5.10.2',
43+
'moment' => '^2.24',
3844
'bootstrap' => '^4.3.1',
39-
'vue' => '^2.5.17',
40-
'vue-template-compiler' => '^2.6.10',
41-
'bootstrap-vue' => '^2.0.1',
45+
'jquery' => '^3.4',
46+
'jquery.nicescroll' => '^3.7'
4247
] + $packages;
4348
}
4449

src/StislaServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ class StislaServiceProvider extends ServiceProvider
1515
public function boot()
1616
{
1717
UiCommand::macro('stisla', function (UiCommand $command) {
18-
StislaPreset::install();
18+
StislaPreset::install($command);
19+
20+
$command->info('Installing package.');
21+
exec('npm install && npm run production');
22+
$command->info('Package installed successfull.');
1923

2024
$command->info('Stisla UI scaffolding installed successfully.');
2125
});

0 commit comments

Comments
 (0)