[
'cache' => env('JQHTML_CACHE', true),
'cache_ttl' => env('JQHTML_CACHE_TTL', 3600),
'source_maps' => env('JQHTML_SOURCE_MAPS', !app()->environment('production')),
],
'runtime' => [
'bundle' => 'node_modules/@jqhtml/core/dist/index.js',
],
'search_patterns' => [
'rsx/**/*.jqhtml',
'rsx/**/*.jqtpl',
],
];
}
/**
* Get priority for this integration
*
* @return int
*/
public static function get_priority(): int
{
return 300; // After jQuery (100) and Lodash (90), before most other integrations
}
/**
* Bootstrap the integration
*/
public static function bootstrap(): void
{
// JQHTML runtime MUST exist - fail loud if not
$runtime_path = base_path(static::get_config()['runtime']['bundle']);
if (!file_exists($runtime_path)) {
throw new \RuntimeException("JQHTML runtime not found at: {$runtime_path}. Run 'npm install' to install @jqhtml packages.");
}
// Register automatic template-to-class binding
// This would be implemented to automatically bind templates to matching ES6 classes
}
/**
* Get dependencies for this integration
*
* @return array
*/
public static function get_dependencies(): array
{
return ['jquery']; // JQHTML requires jQuery to be loaded first
}
}