-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from tightenco/pr/83
Re-attempt to merge Jon's work in for Lambo stuff
- Loading branch information
Showing
69 changed files
with
2,323 additions
and
322 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/vendor | ||
.phpunit.result.cache | ||
/storage/framework/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace App\Actions; | ||
|
||
use App\Shell\Shell; | ||
|
||
class CompileAssets | ||
{ | ||
use LamboAction; | ||
|
||
protected $shell; | ||
protected $silentDevScript; | ||
|
||
public function __construct(Shell $shell, SilentDevScript $silentDevScript) | ||
{ | ||
$this->shell = $shell; | ||
$this->silentDevScript = $silentDevScript; | ||
} | ||
|
||
public function __invoke() | ||
{ | ||
if (! config('lambo.store.mix')) { | ||
return; | ||
} | ||
|
||
$this->silentDevScript->add(); | ||
|
||
$this->logStep('Compiling project assets'); | ||
|
||
$process = $this->shell->execInProject("npm run dev{$this->extraOptions()}"); | ||
|
||
$this->abortIf(! $process->isSuccessful(), 'Compilation of project assets did not complete successfully', $process); | ||
|
||
$this->silentDevScript->remove(); | ||
|
||
$this->info('Project assets compiled successfully.'); | ||
} | ||
public function extraOptions() | ||
{ | ||
return config('lambo.store.with_output') ? '' : ' --silent'; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace App\Actions; | ||
|
||
use App\Shell\Shell; | ||
|
||
class ConfigureFrontendFramework | ||
{ | ||
use LamboAction; | ||
|
||
private $shell; | ||
|
||
private $laravelUi; | ||
|
||
public function __construct(Shell $shell, LaravelUi $laravelUi) | ||
{ | ||
$this->shell = $shell; | ||
$this->laravelUi = $laravelUi; | ||
} | ||
|
||
public function __invoke() | ||
{ | ||
if (! config('lambo.store.frontend')) { | ||
return; | ||
} | ||
|
||
$this->laravelUi->install(); | ||
|
||
$this->logStep('Configuring frontend scaffolding'); | ||
|
||
$process = $this->shell->execInProject('php artisan ui ' . config('lambo.store.frontend')); | ||
|
||
$this->abortIf(! $process->isSuccessful(), "Installation of UI scaffolding did not complete successfully.", $process); | ||
|
||
$this->info('UI scaffolding has been set to ' . config('lambo.store.frontend')); | ||
} | ||
} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Actions; | ||
|
||
use App\InteractsWithLamboConfig; | ||
use Illuminate\Support\Facades\File; | ||
|
||
class EditAfter | ||
{ | ||
use InteractsWithLamboConfig; | ||
|
||
public function __invoke() | ||
{ | ||
$this->createOrEditConfigFile("after", File::get(base_path('stubs/after.stub'))); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Actions; | ||
|
||
use App\InteractsWithLamboConfig; | ||
use Illuminate\Support\Facades\File; | ||
|
||
class EditConfig | ||
{ | ||
use InteractsWithLamboConfig; | ||
|
||
public function __invoke() | ||
{ | ||
$this->createOrEditConfigFile("config", File::get(base_path('stubs/config.stub'))); | ||
} | ||
} |
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
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
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
Oops, something went wrong.