sbt / sbt-rjs

RequireJs optimizer plugin for sbt-web
Other
39 stars 28 forks source link

Regex Exception thrown when the mainModule option is set. #24

Closed njovy closed 10 years ago

njovy commented 10 years ago

As my app uses app.js as a main entry point, I set the mainModule option as the document suggests. However, I got the following exception when I executed dist command.

[trace] Stack trace suppressed: run last *:rjsPaths for the full output.
[error] (*:rjsPaths) java.util.regex.PatternSyntaxException: Unmatched closing '
)' near index 47
[error] ['"]?([^\s'"]*)['"]?\s*:\s*[\[]?.*['"].*/lib\(.*)['"]
[error]                                                ^

Below is the build.sbt file.

import RjsKeys._

name := """play-angular-phonecat"""

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
  "org.webjars" % "jquery" % "1.11.1",
  "org.webjars" % "bootstrap" % "3.1.1",
  "org.webjars" % "angularjs" % "1.2.16" exclude("org.webjars", "jquery"),
  "org.webjars" % "requirejs" % "2.1.11-1"
)     

lazy val root = (project in file(".")).enablePlugins(PlayScala, SbtWeb)

pipelineStages := Seq(rjs, digest, gzip)

RjsKeys.mainModule := "app"
njovy commented 10 years ago

I renamed app.js to main.js and the exception got thrown upon distribution. The project is here https://github.com/team-njovy/play-angular-phonecat

dwickern commented 10 years ago

This is the same problem as #26, caused by the backslash in lib\

huntc commented 10 years ago

Closing given #26