SCSS compilation work-around

Since the SCSS compilation occurs automatically in debug mode, and it seems that manually compiling my SCSS is a bit of a pain (no real support in the Vaadin plugin, and most JARs squirreled away by Ivy), I wanted to find out if this was a valid scheme for me to use instead.

Before we finalize our release, we’d run a traditional non-production Vaadin servlet from our test system (or development PC), then in our browser just request /VAADIN/themes/mytheme/styles.css to get the compiled version to list. I would then SAVE that page as styles.css in the same location so it becomes part of the release to production systems.

Is that effectively the same thing as compiling the SCSS directly?

If you compile the theme and place the generated .css file alongside with the SCSS file, no on-the-fly compilation of the theme is performed.

The easiest way to compile the theme is from the command line (see
this tutorial
), but copying the file from the browser should also work.

The tickets to support theme compilation in plugins are
#10291 (Maven)
and
#10712 (Eclipse)
.

Perfect! Thanks, Henri. I’ll just use the browser version for now until the Eclipse plugin compiler is working.

It would be nice, perhaps, when the VaadinServlet is not in production to use the styles.scss file – if present – even if styles.css is present, and when in production, to use styles.css directly without the compilation. Then we could store the final compiled styles.css in our project for version control and ease of release. Now we need to generate and keep styles.css somewhere in our version control so it goes to production, though not with its related theme files. (I know Ivy is the new way, but that tool produces the same issue in that our release structure doesn’t include the files that need to be released without manually copying them over and hoping we have them all. Couldn’t Ivy put the files it needs into WEB-INF/lib so when we release that, too, we already have the correct tools?)