I’m trying to modify closure compiler option based on the instructions at https://play.lighthouseapp.com/projects/82401/tickets/193-javascript-require-support-in-non-minimized-files.
I need to add a resolver as well.
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)
def optClosureValues = Option(System.getProperty("closureoff")).filter(_ != "").map {
dev =>
println("using alternative closure compiler")
closureCompilerSettings(defaultOptions)
}.getOrElse(Seq.empty)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
optClosureValues:_*,
resolvers += ("Morphia" at "http://morphia.googlecode.com/svn/mavenrepo/")
)
This gives an error
Build.scala:35: no `: _*' annotation allowed here
[error] (such annotations are only allowed in arguments to *-parameters)
[error] optClosureValues:_*,
[error] ^
[error] one error found
Whats the correct syntax here?
You can probably write like:
I confirmed the above working on my machine using the latest 2.1-SNAPSHOT.