mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Add biome + rolldown + lightningcss build pipeline for JS/CSS bundling & minification
- package.json with biome, rolldown, lightningcss devDependencies
- biome.json: add CSS formatter support
- scripts/build-css.mjs: lightningcss resolves @import chain, bundles/minifies CSS
- scripts/build-js.mjs: rolldown per-entry JS bundling (no code splitting)
- scripts/build.mjs: orchestrator for both CSS + JS
- scripts/check-build.mjs: staleness checker for CI/deploy guard
- justfile: add build, build-css, build-js, build-install, build-check recipes
- justfile: deploy recipe now runs build before deploy-code
- head.php + form-page.php: use dist/base.min.css instead of style.css
- All controllers + FormBootstrap: reference dist/*.min.{css,js}
- admin footer: load admin.min.js for all admin pages
- repertoire: use public.min.js instead of individual app JS files
- Fix stray '}' syntax error in admin.css line 305
- .gitignore: add app/public/assets/dist/
This commit is contained in:
@@ -17,6 +17,6 @@
|
||||
<script><?= $extraJsInline ?></script>
|
||||
<?php endif; ?>
|
||||
<script src="/assets/js/vendor/htmx.min.js"></script>
|
||||
<script src="<?= App::assetV('/assets/js/app/htmx-global-setup.js') ?>"></script>
|
||||
<script src="<?= App::assetV('/assets/dist/admin.min.js') ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// Admin: append suffix to title and prepend admin.css
|
||||
if (!empty($isAdmin)) {
|
||||
$pageTitle = isset($pageTitle) ? $pageTitle . ' – Admin' : 'Admin';
|
||||
$extraCss = array_merge(['/assets/css/admin.css'], $extraCssAdmin ?? [], $extraCss ?? []);
|
||||
$extraCss = array_merge(['/assets/dist/admin.min.css'], $extraCssAdmin ?? [], $extraCss ?? []);
|
||||
}
|
||||
?>
|
||||
<title><?= htmlspecialchars($pageTitle ?? 'XAMXAM') ?></title>
|
||||
@@ -70,7 +70,7 @@
|
||||
<?php if (!empty($isAdmin) || !empty($filepondBase)): ?>
|
||||
<meta name="filepond-base" content="<?= htmlspecialchars($filepondBase ?? '/admin/actions/filepond') ?>">
|
||||
<?php endif; ?>
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/dist/base.min.css') ?>">
|
||||
<?php foreach ($extraCss ?? [] as $css): ?>
|
||||
<link rel="stylesheet" href="<?= App::assetV($css) ?>">
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -37,11 +37,11 @@ $filepondBase = $filepondBase ?? null;
|
||||
<?php if ($filepondBase !== null): ?>
|
||||
<meta name="filepond-base" content="<?= htmlspecialchars($filepondBase) ?>">
|
||||
<?php endif; ?>
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/css/form-base.css') ?>">
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/dist/base.min.css') ?>">
|
||||
<?php if ($includeFilePond): ?>
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/css/filepond.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/css/filepond-plugin-image-preview.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/dist/partage-form.min.css') ?>">
|
||||
<?php else: ?>
|
||||
<link rel="stylesheet" href="<?= App::assetV('/assets/dist/form-base.min.css') ?>">
|
||||
<?php endif; ?>
|
||||
<?php foreach ($extraCss as $css): ?>
|
||||
<link rel="stylesheet" href="<?= App::assetV($css) ?>">
|
||||
@@ -52,14 +52,10 @@ $filepondBase = $filepondBase ?? null;
|
||||
<script src="<?= App::assetV('/assets/js/vendor/filepond-plugin-file-validate-size.min.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/js/vendor/filepond-plugin-image-preview.min.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/js/vendor/filepond-plugin-image-exif-orientation.min.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/js/app/file-upload-filepond.js') ?>" defer></script>
|
||||
<?php endif; ?>
|
||||
<script src="<?= App::assetV('/assets/js/app/beforeunload-guard.js') ?>" defer></script>
|
||||
<?php if ($includeFilePond): ?>
|
||||
<script src="<?= App::assetV('/assets/js/app/pill-search.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/js/app/jury-autocomplete.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/js/app/autosave-handler.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/js/vendor/htmx.min.js') ?>" defer></script>
|
||||
<script src="<?= App::assetV('/assets/dist/partage.min.js') ?>" defer></script>
|
||||
<?php else: ?>
|
||||
<script src="<?= App::assetV('/assets/dist/public.min.js') ?>" defer></script>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($extraJs as $js): ?>
|
||||
<script src="<?= App::assetV($js) ?>" defer></script>
|
||||
|
||||
@@ -7,5 +7,4 @@
|
||||
<div id="student-popover" class="student-popover" hidden aria-live="polite"></div>
|
||||
|
||||
<script src="/assets/js/vendor/htmx.min.js"></script>
|
||||
<script src="<?= App::assetV('/assets/js/app/repertoire-student-popover.js') ?>"></script>
|
||||
<script src="<?= App::assetV('/assets/js/app/repertoire-accordion.js') ?>"></script>
|
||||
<script src="<?= App::assetV('/assets/dist/public.min.js') ?>"></script>
|
||||
|
||||
Reference in New Issue
Block a user