Mercurial > packages > auth
comparison src/Console/InstallsBladeStack.php @ 1:a2a3059de103
Updates to some styles and general automation of creation
| author | luka |
|---|---|
| date | Thu, 14 Aug 2025 21:09:25 -0400 |
| parents | 90e38de8f2ba |
| children |
comparison
equal
deleted
inserted
replaced
| 0:90e38de8f2ba | 1:a2a3059de103 |
|---|---|
| 32 | 32 |
| 33 // Views... | 33 // Views... |
| 34 (new Filesystem)->ensureDirectoryExists(resource_path('views')); | 34 (new Filesystem)->ensureDirectoryExists(resource_path('views')); |
| 35 (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/resources/views', resource_path('views')); | 35 (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/resources/views', resource_path('views')); |
| 36 | 36 |
| 37 if (! $this->option('dark')) { | |
| 38 $this->removeDarkClasses((new Finder) | |
| 39 ->in(resource_path('views')) | |
| 40 ->name('*.blade.php') | |
| 41 ->notPath('livewire/welcome/navigation.blade.php') | |
| 42 ->notName('welcome.blade.php') | |
| 43 ); | |
| 44 } | |
| 45 | |
| 46 // Components... | 37 // Components... |
| 47 (new Filesystem)->ensureDirectoryExists(app_path('View/Components')); | 38 (new Filesystem)->ensureDirectoryExists(app_path('View/Components')); |
| 48 (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/app/View/Components', app_path('View/Components')); | 39 (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/app/View/Components', app_path('View/Components')); |
| 49 | 40 |
| 50 // Tests... | 41 // Tests... |
| 58 | 49 |
| 59 // "Dashboard" Route... | 50 // "Dashboard" Route... |
| 60 $this->replaceInFile('/home', '/dashboard', resource_path('views/welcome.blade.php')); | 51 $this->replaceInFile('/home', '/dashboard', resource_path('views/welcome.blade.php')); |
| 61 $this->replaceInFile('Home', 'Dashboard', resource_path('views/welcome.blade.php')); | 52 $this->replaceInFile('Home', 'Dashboard', resource_path('views/welcome.blade.php')); |
| 62 | 53 |
| 63 // Tailwind / Vite... | 54 $this->runCommands(['npm install', 'npm run build']); |
| 64 copy(__DIR__.'/../../stubs/default/tailwind.config.js', base_path('tailwind.config.js')); | |
| 65 copy(__DIR__.'/../../stubs/default/postcss.config.js', base_path('postcss.config.js')); | |
| 66 copy(__DIR__.'/../../stubs/default/vite.config.js', base_path('vite.config.js')); | |
| 67 copy(__DIR__.'/../../stubs/default/resources/css/app.css', resource_path('css/app.css')); | |
| 68 copy(__DIR__.'/../../stubs/default/resources/js/app.js', resource_path('js/app.js')); | |
| 69 | |
| 70 $this->components->info('Installing and building Node dependencies.'); | |
| 71 | |
| 72 if (file_exists(base_path('pnpm-lock.yaml'))) { | |
| 73 $this->runCommands(['pnpm install', 'pnpm run build']); | |
| 74 } elseif (file_exists(base_path('yarn.lock'))) { | |
| 75 $this->runCommands(['yarn install', 'yarn run build']); | |
| 76 } elseif (file_exists(base_path('bun.lock')) || file_exists(base_path('bun.lockb'))) { | |
| 77 $this->runCommands(['bun install', 'bun run build']); | |
| 78 } elseif (file_exists(base_path('deno.lock'))) { | |
| 79 $this->runCommands(['deno install', 'deno task build']); | |
| 80 } else { | |
| 81 $this->runCommands(['npm install', 'npm run build']); | |
| 82 } | |
| 83 | 55 |
| 84 $this->line(''); | 56 $this->line(''); |
| 85 $this->components->info('Breeze scaffolding installed successfully.'); | 57 $this->components->info('Breeze scaffolding installed successfully.'); |
| 86 } | 58 } |
| 87 } | 59 } |
