October\Rain\Assetic\Filter\JavascriptImporter

Overview

JavascriptImporter importer JS Filter Class used to import referenced javascript files.

=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): void

Directive to define and replace variables

protected directiveInclude()

protected directiveInclude($data, $required = false): void

Directive to process script includes

protected directiveRequire()

protected directiveRequire($data): void

Directive to process mandatory script includes

protected parse()

protected parse($content $content): string 

Process JS imports inside a string of javascript