Generate minified CSS/JS in the Docker build, remove unused assets
- New 'assets' stage in the Dockerfile builds style.min.css and functions.min.js from the sources (npm run build:min); they are no longer committed, so they can't go stale anymore - Production (APP_DEBUG off) loads the minified files, local development the readable ones, both with a cache-busting version (AssetHelper, Asset::url() in the layout) - Source maps are excluded from the image - Remove unused assets: public/css/old, public/js/old and unused copies of jQuery, wavesurfer, prettyPhoto (min) and mediaplayer_with_plugins - npm scripts: build:css (committed CSS), build:min (Docker build); sass-minify scripts removed - readme: how the CSS/JS build works Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b399e8bc76
commit
f7b1dbac8f
83 files changed
+72
-17741
No files matched your search
@@ -27,7 +27,8 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/prettyPhoto.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/bootstrap-grid.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css?<?= filemtime("../public/css/style.css"); ?>" />
|
||||
{{-- style.min.css in production (generated by the Docker build), style.css locally --}}
|
||||
<link rel="stylesheet" type="text/css" href="{{ Asset::url('css/style.css') }}" />
|
||||
<meta property="fb:app_id" content="133349980094758" />
|
||||
<meta property="og:site_name" content="GOOI&meer" />
|
||||
<?php if(isset($metadata)) {
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
<script type="text/javascript" src="/assets/vendor/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.prettyPhoto.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.carouFredSel-6.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/functions.js"></script>
|
||||
<script type="text/javascript" src="{{ Asset::url('js/functions.js') }}"></script>
|
||||
<script type="text/javascript" src="/assets/vendor/wavesurfer/wavesurfer.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(window).resize(function () {
|
||||
|
||||
Reference in new issue
Block a user