Function __global->js_compile
Definitions
sources/web_resources2.php
- Compile a JavaScript file.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $j | ID_TEXT | No | No | required parameter | N/A | N/A | Name of the JS file |
| $js_cache_path | PATH | No | No | required parameter | N/A | N/A | Full path to the JS file |
| $minify | boolean | No | No | True | N/A | N/A | Whether to also do minification |
| $theme | ?ID_TEXT | No | No | Null | N/A | N/A | Theme to use (null: current theme) |
Preview
Code (PHP)
/**
* Compile a JavaScript file.
*
* @param ID_TEXT $j Name of the JS file
* @param PATH $js_cache_path Full path to the JS file
* @param boolean $minify Whether to also do minification
* @param ?ID_TEXT $theme Theme to use (null: current theme)
*/
function js_compile(string $j, string $js_cache_path, bool $minify = true, ?string $theme = null)
* Compile a JavaScript file.
*
* @param ID_TEXT $j Name of the JS file
* @param PATH $js_cache_path Full path to the JS file
* @param boolean $minify Whether to also do minification
* @param ?ID_TEXT $theme Theme to use (null: current theme)
*/
function js_compile(string $j, string $js_cache_path, bool $minify = true, ?string $theme = null)

