SassCompiler for compile custom theme

Gentlemen, I am CarloSilva, Brazil. I need help to build a custom theme. Where can I get com.vaadin.sass.SassCompiler? Or, as I find com.vaadin.sass.SassCompiler the classpath of my application?
Thanks and a hug

You should follow this wiki thread:

Just to clarify, you need to import the vaadin-theme-compiler jar file.

Gentlemen, thanks for the reply. I read the article
And follow these steps. When I try to compile, I get the error message:

C:\Documents and Settings\silvacas\workspace\anistiadoAdm\WebContent\VAADIN\them
es\slvtheme>java -cp ‘…/…/…/WEB-INF/lib/*’ com.vaadin.sass.SassCompiler style
s.scss styles.css
Exception in thread “main” java.lang.NoClassDefFoundError: com/vaadin/sass/SassC
Caused by: java.lang.ClassNotFoundException: com.vaadin.sass.SassCompiler
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.vaadin.sass.SassCompiler. Program will exit.

I know this class is missing com.vaadin.sass.SassCompiler. So I wonder where I can find it…
Can you help me in a step by step how to build a theme?
A hug…

As I said, you need the vaadin-theme-compiler jar file. It can be found in the download package, or in Maven.

Thomas, please, I’m an asshole … rs … I try to follow the tutorial when it says “java-cp … ‘… /… /… / WEB-INF / lib / *’ com.vaadin.sass.SassCompiler styles.scss styles.css …”. And I get the error described above. I have this jar in WEB-INF/lib folder. But still get the error message. Remembering asshole that I am, I beg you, tell me a step by step that would allow me to compile my theme?
Thank you for your attention.
a hug

Carlos, we’ve avoiding compiling the themes until Vaadin has a scheme to do it more easily. This is one of the big drawbacks on using Ivy to manage JARs that are stored in a cache area instead of downloading and installing the correct JARs in WEB-INF/lib for us, and those JARs they need but shouldn’t be released to a web app server could be put in another location to be used during builds. Then we’d all know exactly which JARs are being used at a given project release point.

What we do is before we do the release, we run in debug mode so that SASS compiler automatically runs, and then we use our browser to request the URL /WEBAPPNAME/VAADIN/themes/YOURTHEMENAME/styles.css – the compiler automatically runs and generates the styles.css for display in your browser, and then you can just save that file for release.

Hmmm … David, I like your answer! Anyway I can use my own theme in the application. Thank you for the tip. a hug

The experimental version of the Eclipse plug-in now has support for compiling a theme from the toolbar. This should be coming to the next official release of the plugin sometime soon.

The current branch of the Vaadin plugin for Maven also has support for theme compilation (goal vaadin:compile-theme), coming at least to the 7.1.0 version of the plugin sometime soon.

The plugins will be usable also with older release versions of Vaadin, but might not be 100% compatible with past beta versions.

For people who will see this thread in the future.

Include ‘vaadin-server’ dependency which depends on ‘vaadin-sass-compiler’.


For more detail, you can refer
my article
official article