mirror of
https://github.com/flarum/core.git
synced 2025-07-25 18:51:40 +02:00
Massive JavaScript cleanup
- Use JSX for templates - Docblock/comment everything - Mostly passes ESLint (still some work to do) - Lots of renaming, refactoring, etc. CSS hasn't been updated yet.
This commit is contained in:
@@ -13,12 +13,15 @@ class JsCompiler extends RevisionCompiler
|
||||
|
||||
public function compile()
|
||||
{
|
||||
$output = "var app = require('flarum/app')['default']; app.translator.translations = ".json_encode($this->translations).";";
|
||||
$output = "var initLocale = function(app) {
|
||||
app.translator.translations = ".json_encode($this->translations).";";
|
||||
|
||||
foreach ($this->files as $filename) {
|
||||
$output .= file_get_contents($filename);
|
||||
}
|
||||
|
||||
$output .= "};";
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user