Skip to content

Instantly share code, notes, and snippets.

@christoph-frick
Last active August 29, 2015 13:56
Show Gist options
  • Save christoph-frick/8811271 to your computer and use it in GitHub Desktop.
Save christoph-frick/8811271 to your computer and use it in GitHub Desktop.
Build Vaadin Themes (scripts/_Events.groovy)
import com.vaadin.sass.internal.ScssStylesheet
eventCreateWarStart = { name, stagingDir ->
new File("${stagingDir}/VAADIN/themes/").eachDir {
def scssName = "${it}/styles.scss"
if (new File(scssName).exists()) {
ScssStylesheet scss = ScssStylesheet.get(scssName)
scss.compile()
def outFile = new File("$it/styles.css")
outFile.write(scss.toString())
ant.delete(dir:"${it}", includes: "**/*.scss", verbose: true)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment