Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Save compiled CSS file in Specific path

Avatar

Level 1

Hi,

I need the LESS compiler to save the compiled css file in a specific path.

Where do I set this configuration?

Thanks

4 Replies

Avatar

Level 10

Typically CSS files are stored in Clientlibs, Less CSS should be no different to use in AEM. See this older community article that can still point you in the correct direction.

Avatar

Level 1

I understand. Right now, I have all my .less files under /etc/clientlibs

The compiled .css file is stored under /var/clientlibs. I want that compiled file under /etc.. Could you please tell me where do I mention the config for that?

Avatar

Level 4

Usually, the cached copies of clientlibs is stored under /var/clientlibs. Why do you need an alternate path?

Avatar

Level 1

Thanks all for the response.

I have a need to process the compiled css in my java. If for any reason, the cached css files are not present (since they are system generated), my java process doesn't run successfully. So, I thought to have the css file generated compile time instead of run time.

I found the lesscss maven plugin, which helps me to compile the less files needed onto a specific path. So, my java process now refers to a css file created on compile time, which avoids the cache copy not present issue.