mirror of
https://github.com/flarum/core.git
synced 2025-06-06 06:35:09 +02:00
Allow easier overriding of js compiler (#2318)
This commit is contained in:
parent
3b63d774d3
commit
c7b67b922b
@ -102,7 +102,7 @@ class Assets
|
||||
|
||||
public function makeJs(): JsCompiler
|
||||
{
|
||||
$compiler = new JsCompiler($this->assetsDir, $this->name.'.js');
|
||||
$compiler = $this->makeJsCompiler($this->name.'.js');
|
||||
|
||||
$this->populate($compiler, 'js');
|
||||
|
||||
@ -120,7 +120,7 @@ class Assets
|
||||
|
||||
public function makeLocaleJs(string $locale): JsCompiler
|
||||
{
|
||||
$compiler = new JsCompiler($this->assetsDir, $this->name.'-'.$locale.'.js');
|
||||
$compiler = $this->makeJsCompiler($this->name.'-'.$locale.'.js');
|
||||
|
||||
$this->populate($compiler, 'localeJs', $locale);
|
||||
|
||||
@ -136,6 +136,11 @@ class Assets
|
||||
return $compiler;
|
||||
}
|
||||
|
||||
protected function makeJsCompiler(string $filename)
|
||||
{
|
||||
return new JsCompiler($this->assetsDir, $filename);
|
||||
}
|
||||
|
||||
protected function makeLessCompiler(string $filename): LessCompiler
|
||||
{
|
||||
$compiler = new LessCompiler($this->assetsDir, $filename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user