掲示板

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

7年前 に JIna :) によって更新されました。

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

New Member 投稿: 22 参加年月日: 13/10/16 最新の投稿
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
6年前 に I La によって更新されました。

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

New Member 投稿: 2 参加年月日: 17/05/03 最新の投稿
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.
6年前 に JIna :) によって更新されました。

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

New Member 投稿: 22 参加年月日: 13/10/16 最新の投稿
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
6年前 に Thomas Pieronczyk によって更新されました。

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

New Member 投稿: 3 参加年月日: 16/10/14 最新の投稿
Did you find a solution to minify your theme css and js?
thumbnail
6年前 に Olaf Kock によって更新されました。

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

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
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.