JsCompile compiles LESS

Protected Properties

protected string $basePath

basePath is the location of where the processed JS script resides.

protected array $includedFiles

includedFiles is a cache of required files.

Public Methods

public compile()

public compile($js, $options = []): void

public compileFile()

public compileFile($path, $options = []): void

Protected Methods

protected directiveDefine()

protected directiveDefine($data): void

directiveDefine to define and replace variables

protected directiveInclude()

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

directiveInclude to process script includes

protected directiveRequire()

protected directiveRequire($data): void

directiveRequire to process mandatory script includes

protected parse()

protected parse($content $content): string 

Process JS imports inside a string of javascript