Fix bin/publish: use correct .env path for rspade_system Fix bin/publish script: prevent grep exit code 1 from terminating script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.6 KiB
Executable File
1.6 KiB
Executable File
Bundle Processor System
Architecture
- Extension-agnostic BundleCompiler: Only handles .js and .css files directly
- Global processor configuration: Processors configured in
config/rsx.phpunderbundle_processors - Processors receive ALL files: Each processor examines all collected files and decides what to process
- No per-bundle processor config: Processors are globally enabled, not per-bundle
How It Works
- BundleCompiler collects ALL files from bundle includes (not just JS/CSS)
- Each configured processor receives the full list of collected files
- Processors decide which files to process based on extension or other criteria
- Processed files replace or augment original files in the bundle
- Final bundle contains JS and CSS files only
Creating a Processor
class MyProcessor extends AbstractBundleProcessor {
public static function get_name(): string { return 'myprocessor'; }
public static function get_extensions(): array { return ['myext']; }
public static function process(string $file_path, array $options = []): ?array {
// Transform file and return result or null to exclude
}
}
Registering Processors
Add to config/rsx.php:
'bundle_processors' => [
\App\RSpade\Processors\MyProcessor::class,
]
SCSS @import Validation
- Non-vendor files: Cannot use @import directives (throws error)
- Vendor files: Files in directories named 'vendor' CAN use @import
- Rationale: @import bypasses bundle dependency management
- Solution: Include dependencies directly in bundle definition