Skip to content

Instantly share code, notes, and snippets.

@pk11
Created July 3, 2012 22:38
Show Gist options
  • Save pk11/3043883 to your computer and use it in GitHub Desktop.
Save pk11/3043883 to your computer and use it in GitHub Desktop.
using WHITESPACE only compilation level and pretty printing for an alternative closure CompilerOptions
//in Build.scala
//requires play 2.1!
import com.google.javascript.jscomp._
val defaultOptions = new CompilerOptions()
defaultOptions.closurePass = true
CompilationLevel.WHITESPACE_ONLY.setOptionsForCompilationLevel(defaultOptions)
defaultOptions.setProcessCommonJSModules(true)
val root = new java.io.File(".")
defaultOptions.setCommonJSModulePathPrefix(root.getCanonicalPath+"/app/assets/javascript/")
defaultOptions.setPrettyPrint(true)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
closureCompilerSettings(defaultOptions):_*
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment