1
0
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:
Toby Zerner
2015-07-15 14:00:11 +09:30
parent e1ed1ec7e6
commit 1c7653e79e
220 changed files with 9785 additions and 5919 deletions

View File

@@ -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;
}
}