Skip to content

Commit

Permalink
Add navigation modules to the production site.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mercihabam committed Oct 16, 2024
1 parent 28f1285 commit 65a96ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/config_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,18 @@ function get_module_assignments($settings) {
$mods = get_modules($settings);
foreach ($mods as $mod) {
printf("scanning module %s ...\n", $mod);
if ($mod === 'core') {
foreach (['routes', 'utils', 'navigation'] as $js_module) {
$js .= file_get_contents("modules/core/navigation/$js_module.js");
}
}
foreach (glob('modules' . DIRECTORY_SEPARATOR . $mod . DIRECTORY_SEPARATOR . 'js_modules' . DIRECTORY_SEPARATOR . '*.js') as $js_module) {
$js .= file_get_contents($js_module);
}
if (is_readable(sprintf("modules/%s/site.js", $mod))) {
$js .= str_replace("'use strict';", '', file_get_contents(sprintf("modules/%s/site.js", $mod)));
}

if (is_readable(sprintf("modules/%s/site.css", $mod))) {
$css .= file_get_contents(sprintf("modules/%s/site.css", $mod));
}
Expand Down

0 comments on commit 65a96ff

Please sign in to comment.