Move mode detection from Rsx_Mode to Rsx class
Simplify ajax batching to be mode-based instead of configurable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ namespace App\RSpade\Commands\Rsx;
|
||||
use App\RSpade\Core\Bundle\BundleCompiler;
|
||||
use App\RSpade\Core\Bundle\Minifier;
|
||||
use App\RSpade\Core\Manifest\Manifest;
|
||||
use App\RSpade\Core\Mode\Rsx_Mode;
|
||||
use App\RSpade\Core\Rsx;
|
||||
use Exception;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
@@ -25,9 +25,7 @@ class Prod_Build_Command extends Command
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$mode = Rsx_Mode::get();
|
||||
|
||||
if ($mode === Rsx_Mode::DEVELOPMENT) {
|
||||
if (Rsx::is_development()) {
|
||||
$this->warn('Warning: Building production assets in development mode.');
|
||||
$this->line('Assets will be built but will not be used until you switch modes:');
|
||||
$this->line(' php artisan rsx:mode:set debug');
|
||||
@@ -62,7 +60,7 @@ class Prod_Build_Command extends Command
|
||||
$this->line('[2/3] Compiling bundles...');
|
||||
|
||||
// Force restart minify server to pick up any code changes
|
||||
if (Rsx_Mode::is_production()) {
|
||||
if (Rsx::is_production()) {
|
||||
Minifier::force_restart();
|
||||
}
|
||||
|
||||
@@ -157,7 +155,7 @@ class Prod_Build_Command extends Command
|
||||
$this->newLine();
|
||||
$this->info("[OK] Production build complete ({$elapsed}s)");
|
||||
|
||||
if ($mode === Rsx_Mode::DEVELOPMENT) {
|
||||
if (Rsx::is_development()) {
|
||||
$this->newLine();
|
||||
$this->line('To use these assets, switch to production mode:');
|
||||
$this->line(' php artisan rsx:mode:set production');
|
||||
|
||||
Reference in New Issue
Block a user