Closed kboucher closed 7 years ago
Hey @kboucher
With the correct Portal properties set, the css files should be minified by Portal. Meaning we wouldn't need to minify them during the build process.
Do you know what Portal properties you are using?
These are from my dev environment. I don't handle the production deployments, but it would be great to know what settings I need to make sure all CSS assets are minified. Thx!
theme.css.fast.load=false
theme.css.fast.load.check.request.parameter=true
theme.images.fast.load=false
theme.images.fast.load.check.request.parameter=true
javascript.fast.load=true
javascript.log.enabled=false
javascript.single.page.application.enabled=false
layout.template.cache.enabled=false
browser.launcher.url=
combo.check.timestamp=true
freemarker.engine.cache.storage=soft:1
freemarker.engine.resource.modification.check.interval=0
minifier.enabled=false
openoffice.cache.enabled=false
velocity.engine.resource.modification.check.interval=0
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.etag.ETagFilter=false
com.liferay.portal.servlet.filters.header.HeaderFilter=false
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true
Hey @kboucher
I believe you would need to set the following for the css minification to take place.
theme.css.fast.load=true
minifier.enabled=true
Also here are some links to the relevant Portal properties documentation.
https://docs.liferay.com/portal/7.0/propertiesdoc/portal.properties.html#Theme https://docs.liferay.com/portal/7.0/propertiesdoc/portal.properties.html#Minifier
Awesome, thanks I will try that!
Worked like a charm (well, except the Liferay minifier leaves comments in the aui.css), but I guess that's as good as it gets.
Thanks again!
I recently added some
gulp
tasks to my Liferay DXP theme project to concatenate and minify our theme's JavaScript files and to minimize themain.css
file generated by theliferay-theme-tasks
build
process.However I have been unable to successfully minify the generated
aui.scss
file. I even tried hooking into thebefore:build:war
hook to no avail.Is this something that can be supported by
liferay-theme-tasks
or is that outside the scope of this project?