Foren

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

JIna :), geändert vor 6 Jahren.

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

New Member Beiträge: 22 Beitrittsdatum: 16.10.13 Neueste Beiträge
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, geändert vor 6 Jahren.

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

New Member Beiträge: 2 Beitrittsdatum: 03.05.17 Neueste Beiträge
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 :), geändert vor 6 Jahren.

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

New Member Beiträge: 22 Beitrittsdatum: 16.10.13 Neueste Beiträge
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, geändert vor 6 Jahren.

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

New Member Beiträge: 3 Beitrittsdatum: 14.10.16 Neueste Beiträge
Did you find a solution to minify your theme css and js?
thumbnail
Olaf Kock, geändert vor 6 Jahren.

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

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
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.