Created
October 24, 2013 19:09
-
-
Save koizuss/7143173 to your computer and use it in GitHub Desktop.
gradle+compass+livereloadx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
maven { url 'http://dl.bintray.com/robfletcher/gradle-plugins' } | |
} | |
dependencies { | |
classpath 'org.gradle.plugins:gradle-compass:1.0.7' | |
} | |
} | |
apply plugin: 'compass' | |
apply plugin: 'jetty' | |
/** | |
* Repositories | |
* @see http://www.gradle.org/docs/current/userguide/userguide_single.html#sec:repositories | |
*/ | |
repositories { | |
mavenCentral() | |
} | |
compass { | |
cssDir = file("$webAppDir/style/css") | |
sassDir = file('src/main/sass') | |
debugInfo = false | |
environment = 'production' | |
noLineComments = false | |
} | |
task livereloadx { | |
description 'start livereload' | |
group 'Run background' | |
ext { | |
daemon = false | |
} | |
doLast { | |
def cmd = { | |
commandLine 'livereloadx', webAppDir | |
} | |
if(daemon) { | |
Thread.start { exec cmd } | |
return | |
} | |
exec cmd | |
} | |
} | |
jettyRun { | |
doFirst { | |
watchSass.execute() | |
livereloadx.daemon = true | |
livereloadx.execute() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment