Created
June 15, 2018 14:58
-
-
Save nulpatrol/60161b029e8409f044d4d2d481252983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Illuminate\Foundation\Console\Presets; | |
class Bootstrap extends Preset | |
{ | |
/** | |
* Install the preset. | |
* | |
* @return void | |
*/ | |
public static function install($dev = true) | |
{ | |
static::updatePackages($dev); | |
static::updateSass(); | |
static::removeNodeModules(); | |
} | |
/** | |
* Update the given package array. | |
* | |
* @param array $packages | |
* @return array | |
*/ | |
protected static function updatePackageArray(array $packages) | |
{ | |
return [ | |
'bootstrap' => '^4.0.0', | |
'jquery' => '^3.2', | |
'popper.js' => '^1.12', | |
] + $packages; | |
} | |
/** | |
* Update the Sass files for the application. | |
* | |
* @return void | |
*/ | |
protected static function updateSass() | |
{ | |
copy(__DIR__.'/bootstrap-stubs/_variables.scss', resource_path('assets/sass/_variables.scss')); | |
copy(__DIR__.'/bootstrap-stubs/app.scss', resource_path('assets/sass/app.scss')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment