Foros de discusión

Themes css (sass) and js is not minified automaticaly by Liferay 6.2

JIna :), modificado hace 7 años.

Themes css (sass) and js is not minified automaticaly by Liferay 6.2

New Member Mensajes: 22 Fecha de incorporación: 16/10/13 Mensajes recientes
Hi,
We developed custom theme for Liferay 6.2. As minifier.enabled=true we expected that themes css and js files will be minimized. However it isn't so.
What configurations should be done in a theme to make that work?

Thanks in advance,
JIna
thumbnail
I La, modificado hace 7 años.

RE: Themes css (sass) and js is not minified automaticaly by Liferay 6.2

New Member Mensajes: 2 Fecha de incorporación: 3/05/17 Mensajes recientes
Did you imported for example compass at least in the SASS files?
Can you post the structure of your theme?
Where did you put the files? The custom css files and js should be in /_diffs folder.
JIna :), modificado hace 7 años.

RE: Themes css (sass) and js is not minified automaticaly by Liferay 6.2

New Member Mensajes: 22 Fecha de incorporación: 16/10/13 Mensajes recientes
Our custom css files are in css folder, no _diffs folder was created. Liferay 6.2 searches for _diffs folder for custom css files?
Structure of the theme:
src
-main
--webapp
---css
----bootstap
----- <!- specific bootstrap styles scss ->
----custom-style
----- <!- specific our theme styles scss ->
----aui.css
----bootstrap.css
----style.css
---images
---js
---templates
---WEB-INF
Thomas Pieronczyk, modificado hace 6 años.

RE: Themes css (sass) and js is not minified automaticaly by Liferay 6.2

New Member Mensajes: 3 Fecha de incorporación: 14/10/16 Mensajes recientes
Did you find a solution to minify your theme css and js?
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Themes css (sass) and js is not minified automaticaly by Liferay 6.2

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Thomas Pieronczyk:
Did you find a solution to minify your theme css and js?


Do you also use no _diffs folder when building your theme? This is a build-time technique to separate your changes from Liferay's defaults - then use Plugin SDK's Ant-Scripts to build the theme. If this fails, you're on to something. When you skip all of those steps, I recommend to redo as a proper plugin and use those scripts. Otherwise you'll have to mimic whatever the scripts do.
Do not run Liferay in Developer mode (e.g. including portal-developer.properties), this will explicitly disable minifying as well.