Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 25, 2024
1 parent 1572efc commit a2d99ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/sync
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ function line(string $code, int $tab = 0): string {

$purgeSkeletonDirectories();

if (! is_file($configureSkeleton = Orchestra\Testbench\join_paths($workingPath, 'vendor', 'orchestra', 'testbench-core', 'bin', 'configure-skeleton.php'))) {
throw new RuntimeException(sprintf('Misssing [%s] file from `orchestra/testbench-core`', $configureSkeleton));
}

$files->copy("{$workingPath}/vendor/orchestra/testbench-core/laravel/bootstrap/app.php", "{$workingPath}/laravel/bootstrap/app.php");
$files->copy("{$workingPath}/vendor/orchestra/testbench-core/laravel/server.php", "{$workingPath}/laravel/server.php");
$files->copy("{$workingPath}/vendor/orchestra/testbench-core/laravel/.gitignore", "{$workingPath}/laravel/.gitignore");
Expand All @@ -31,7 +35,7 @@ Symfony\Component\Process\Process::fromShellCommandline(
'composer create-project "laravel/laravel:9.x-dev" skeleton --no-scripts --no-plugins --quiet --no-install', $workingPath
)->mustRun();

require Orchestra\Testbench\join_paths($workingPath, 'vendor', 'orchestra', 'testbench-core', 'bin', 'configure-skeleton.php');
require $configureSkeleton;

transform([
line('App\Providers', 2) => line('// App\Providers', 2),
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
"@php testbench-dusk package:create-sqlite-db",
"@php vendor/bin/phpunit --no-coverage --no-configuration --dont-report-useless-tests --bootstrap vendor/autoload.php --color tests"
],
"sync": [
"@clear",
"@php bin/sync",
"@lint"
],
"ci": [
"@prepare",
"@dusk:install-chromedriver",
Expand Down

0 comments on commit a2d99ee

Please sign in to comment.