Ship module JS files even with minified JS

This commit is contained in:
Thomas Gelf 2014-03-26 09:24:27 +00:00
parent 90665a2711
commit faec625912
1 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,8 @@ class JavaScript
// TODO: Cache header
header('Content-Type: text/css');
// We do not minify vendor files
foreach (self::$vendorFiles as $file) {
$out .= file_get_contents($basedir . '/' . $file);
}
@ -61,6 +63,13 @@ class JavaScript
foreach (self::$jsFiles as $file) {
$js .= file_get_contents($basedir . '/' . $file);
}
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $name => $module) {
if ($module->hasJs()) {
$js .= file_get_contents($module->getJsFilename());
}
}
$out .= Minifier::minify($js, array('flaggedComments' => false));
echo $out;
}