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
+2
-3
@@ -6,10 +6,9 @@
|
||||
"build": "grunt --gruntfile Gruntfile.cjs concat uglify",
|
||||
"postinstall": "node scripts/setup-vendor.js || true",
|
||||
"sass": "sass resources/assets/sass:public/css",
|
||||
"build:css": "sass --no-source-map resources/assets/sass:public/css && sass --no-source-map --style compressed resources/assets/sass/style.scss:public/css/style.min.css",
|
||||
"build:css": "sass --no-source-map resources/assets/sass:public/css",
|
||||
"build:min": "sass --no-source-map --style compressed resources/assets/sass/style.scss:public/css/style.min.css && grunt --gruntfile Gruntfile.cjs concat uglify",
|
||||
"sass-watch": "sass --watch resources/assets/sass:public/css",
|
||||
"sass-minify": "sass resources/assets/sass/style.scss:public/css/style.min.css --style compressed",
|
||||
"sass-minify-watch": "sass --watch resources/assets/sass/style.scss:public/css/style.min.css --style compressed",
|
||||
"js-watch": "grunt --gruntfile Gruntfile.cjs watch"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in new issue
Block a user