1+ name := " jquery-demo"
2+
3+ version in ThisBuild := " 1.0.0-SNAPSHOT"
4+ scalaVersion in ThisBuild := " 2.11.8"
5+ organization in ThisBuild := " io.udash"
6+ crossPaths in ThisBuild := false
7+ scalacOptions in ThisBuild ++= Seq (
8+ " -feature" ,
9+ " -deprecation" ,
10+ " -unchecked" ,
11+ " -language:implicitConversions" ,
12+ " -language:existentials" ,
13+ " -language:dynamics" ,
14+ " -Xfuture" ,
15+ " -Xfatal-warnings" ,
16+ " -Xlint:_,-missing-interpolator,-adapted-args"
17+ )
18+
19+ // TODO: remove it after scala-js-jquery 1.0 release
20+ externalResolvers in ThisBuild := Seq (
21+ DefaultMavenRepository ,
22+ Resolver .file(" local" , file(System .getProperty(" user.home" ) + " /.ivy2/local" ))(Resolver .ivyStylePatterns)
23+ )
24+
25+ val generatedDir = file(" generated" )
26+ val `jquery-demo` = project.in(file(" ." )).enablePlugins(ScalaJSPlugin )
27+ .settings(
28+ libraryDependencies ++= deps.value,
29+ persistLauncher in Compile := true ,
30+
31+ /* move these files out of target/. */
32+ crossTarget in (Compile , fullOptJS) := generatedDir,
33+ crossTarget in (Compile , fastOptJS) := generatedDir,
34+ crossTarget in (Compile , packageJSDependencies) := generatedDir,
35+ crossTarget in (Compile , packageScalaJSLauncher) := generatedDir,
36+ crossTarget in (Compile , packageMinifiedJSDependencies) := generatedDir,
37+
38+ compile <<= (compile in Compile ).dependsOn(compileStatics),
39+ compileStatics := {
40+ compileStaticsForRelease.value
41+ (crossTarget.value / StaticFilesDir ).*** .get
42+ },
43+
44+ artifactPath in(Compile , fastOptJS) :=
45+ (crossTarget in(Compile , fastOptJS)).value / StaticFilesDir / WebContent / " scripts" / " frontend-impl-fast.js" ,
46+ artifactPath in(Compile , fullOptJS) :=
47+ (crossTarget in(Compile , fullOptJS)).value / StaticFilesDir / WebContent / " scripts" / " frontend-impl.js" ,
48+ artifactPath in(Compile , packageJSDependencies) :=
49+ (crossTarget in(Compile , packageJSDependencies)).value / StaticFilesDir / WebContent / " scripts" / " frontend-deps-fast.js" ,
50+ artifactPath in(Compile , packageMinifiedJSDependencies) :=
51+ (crossTarget in(Compile , packageMinifiedJSDependencies)).value / StaticFilesDir / WebContent / " scripts" / " frontend-deps.js" ,
52+ artifactPath in(Compile , packageScalaJSLauncher) :=
53+ (crossTarget in(Compile , packageScalaJSLauncher)).value / StaticFilesDir / WebContent / " scripts" / " frontend-init.js"
54+ )
0 commit comments