How to use on-the-fly theme compilation

Hi group,

we’re developing a Vaadin (7.6.4) application using a custom theme that inherits from the valo theme (using SCSS).
However we didn’t manage yet to get the on-the-fly theme compilation up and running. Compiling the theme with Maven every time a style has been changed is very time consuming.

Unfortunately I couldn’t find a comprehensive guide or check list where all steps/preconditions are listed and described, that are needed to make on-the-fly compilation work.

Can someone please help?

Thanks and Best Regards
Stefan

I can only describe what I’m doing, don’t know if there’s a better way.
If you build with maven, a styles.css file is generated (in src/main/webapps/VAADIN/themes/ and/or in target//VAADIN/themes/
To make on-the-fly recompilation work I always delete those. (I’m pretty sure that this step can be avoided by making sure the vaadin-maven-plugin doesn’t compile the theme, but I’ve been to lazy to change that so far)

I think productionMode needs to be set to false for on-the-fly compilation to work as well.

That’s about it, if it works it will generate a styles.scss.cache file in the target themes folder.

We’re using spring boot, but I don’t think that matters much in that case.

Thanks for your anwer!

We got it working now. We have created a maven profile -production which creates the CSS files and packs them into the war file. When building with the -development profile (default), no CSS files are generated, so that we can use the on-the-fly theme compilation.