October\Rain\Assetic\Filter\JavascriptImporter
Overview
JavascriptImporter importer JS Filter Class used to import referenced javascript files, inside comments.
=include library/jquery.js; =require library/jquery.js;
Implements
- October\Rain\Assetic\Filter\FilterInterface
Protected Properties
protected string $scriptPath
Location of where the processed JS script resides.
protected string $scriptFile
File name for the processed JS script.
protected array $includedFiles
Cache of required files.
protected array $definedVars
Variables defined by this script.
Public Methods
public filterDump()
public filterDump($asset): void
public filterLoad()
public filterLoad($asset): void
Protected Methods
protected directiveDefine()
protected directiveDefine($data): string
Directive to define and replace variables
protected directiveInclude()
protected directiveInclude($data, $required = false): string
Directive to process script includes
protected directiveRequire()
protected directiveRequire($data): string
Directive to process mandatory script includes
protected parse()
protected parse(string $content): string
Process JS imports inside a string of javascript