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

SOLVED

LESS with CQ

Avatar

Level 2

Is it possible to change the version of LESS CQ uses?  I have read in certain places that it isn't but was wondering if anybody has figured out a workaround for this?  Currently I can't get Twitter Bootstrap 3.0 in LESS to compile with the version of LESS used in CQ.

1 Accepted Solution

Avatar

Correct answer by
Level 5

I significantly doubt if what you're asking is easy or even possible.

However, you could use an alternative approach if you're using Maven to build your projects. We've used a setup where the Maven build compiles the LESS files into CSS, before putting them into CRX as part of the clientlib. So our clientlib is defined to use CSS files that don't technically exist until compilation, then Maven creates them. Both the LESS and CSS files are deployed to CRX, but the LESS files are really only there for informational purposes.

The drawback is that you can't make ad hoc changes to the LESS files within CRXDE (that isn't your primary IDE is it?), but I've found this limitation quite easy to work around. I really like this setup, because it gives you a bit more flexibility in how your app compiles and it works around a few other limitations of CQ's built-in LESS compilation.

View solution in original post

2 Replies

Avatar

Not applicable

rogerblanton87 wrote...

Is it possible to change the version of LESS CQ uses?  I have read in certain places that it isn't but was wondering if anybody has figured out a workaround for this?  Currently I can't get Twitter Bootstrap 3.0 in LESS to compile with the version of LESS used in CQ.

 

We've got Bootstrap 3.0 compiling in 5.6.1, but yes - the ClientLib system seems extremely unflexible.

Everything is possible if you're willing to bring a java decompiler to the party, but it's not something I'd recommend for a production environment.

Avatar

Correct answer by
Level 5

I significantly doubt if what you're asking is easy or even possible.

However, you could use an alternative approach if you're using Maven to build your projects. We've used a setup where the Maven build compiles the LESS files into CSS, before putting them into CRX as part of the clientlib. So our clientlib is defined to use CSS files that don't technically exist until compilation, then Maven creates them. Both the LESS and CSS files are deployed to CRX, but the LESS files are really only there for informational purposes.

The drawback is that you can't make ad hoc changes to the LESS files within CRXDE (that isn't your primary IDE is it?), but I've found this limitation quite easy to work around. I really like this setup, because it gives you a bit more flexibility in how your app compiles and it works around a few other limitations of CQ's built-in LESS compilation.