Question

This may be a problem that others have had before, but I've not been able to find the right search terms if so.

I am using LESS CSS (a CSS pre-processor) in my webapp, and I need it automatically compile a CSS file whenever a LESS file is saved, such that I can just refresh my browser and see the changes. I have previously been successful in doing this by changing the project properties in MyEclipse, in order to point at an external maven executable, and the generate-sources phase within my project's POM.

We're now in the progress of transitioning to GIT (very slowly), and as a step on that path, we want to ensure none of the project files are in version control. Obviously this means that setting up an external executable in the project files is no longer viable, if I want all developers to automatically have this happen for them.

Can anyone please point me in the right direction for solving my problem?

Was it helpful?

Solution

You could try the web resource optimizer for java (aka wro4j). It can apply less css processor (or many other processors) using both: runtime solution (as a filter) or build-time solution (as a maven plugin with m2-wro4j eclipse plugin which is capable of identifying incremental builds).

Alternatively, there is a lightweight solution which process the less resources on the fly, using the LessCssFilter

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top