Skip to content

Commit d4943ad

Browse files
committed
Buildscript cleanup
1 parent 82e8dcf commit d4943ad

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

build.sbt

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ val moveLibs = taskKey[Pipeline.Stage]("Moves libraries")
1818

1919
val removeUnversionedAssets = taskKey[Pipeline.Stage]("Removes unversioned assets")
2020

21-
val explicitlyExcludedLibFiles = Set(
22-
"lib/bootstrap/fonts/glyphicons-halflings-regular.eot", "lib/bootstrap/fonts/glyphicons-halflings-regular.svg",
23-
"lib/bootstrap/fonts/glyphicons-halflings-regular.ttf", "lib/bootstrap/fonts/glyphicons-halflings-regular.woff2"
24-
)
25-
2621
val genHtmlDir = settingKey[File]("Output directory for HTML generated files")
2722

2823
val PublicDirName = "statistiky" // TODO: DRY this constant from routes
@@ -58,13 +53,10 @@ lazy val server = (project in file("server")).settings(
5853
scalacOptions ++= Seq("-deprecation", "-feature"),
5954
scalaVersion := scalaV2,
6055
scalaJSProjects := Seq(client),
61-
scalaJSStage := FullOptStage,
6256
Assets / pipelineStages := Seq(scalaJSPipeline),
6357
pipelineStages := Seq(concat, removeLibs, filter, digest, simpleUrlUpdate/*, digest*/, removeUnversionedAssets, moveLibs),
6458
digest / includeFilter := "*",
65-
digest / excludeFilter := "*.html" || "*.csv" || "*.json" || "*.json.new" ||
66-
// When sbt-simple-url-update updates path for glyphicons-halflings-regular.woff, it garbles the path for glyphicons-halflings-regular.woff2.
67-
"glyphicons-halflings-regular.woff",
59+
digest / excludeFilter := "*.html" || "*.csv" || "*.json" || "*.json.new",
6860
filter / excludeFilter := "*.scss" || "*.note" || "*.source" || "*.css" - "main.css" || "*.js" - "main.min.js",
6961
filter / includeFilter := "*.css" || "*.html" || "*.js" || "*.csv" || "*.svg" || "*.woff" || "*.ttf" || "*.eot" || "*.woff2" || "*.json.new",
7062
genHtmlDir := target.value / "web" / "html" / "main",
@@ -88,7 +80,7 @@ lazy val server = (project in file("server")).settings(
8880
}
8981
}.taskValue,
9082
removeUnversionedAssets := { mappings: Seq[PathMapping] =>
91-
mappings.filter{case (file, name) => !(name.startsWith("main.") || explicitlyExcludedLibFiles.contains(name))}
83+
mappings.filter{case (file, name) => !(name.startsWith("main.") )}
9284
},
9385
removeLibs := { mappings: Seq[PathMapping] => // Most of libs are already included in a CSS/JS file, so skip them
9486
mappings.filter{case (file, name) => (!name.startsWith("lib/")) || name.startsWith("lib/bootstrap/fonts")}
@@ -109,7 +101,7 @@ lazy val server = (project in file("server")).settings(
109101
"org.webjars" % "bootstrap" % bootstrapVersion,
110102
specs2 % Test
111103
),
112-
).enablePlugins(PlayScala, SbtWeb, WebScalaJSBundlerPlugin)//.dependsOn(sharedJvm)
104+
).enablePlugins(PlayScala, SbtWeb, WebScalaJSBundlerPlugin)
113105

114106
// Generates client JS; other assets are generated by the server subproject
115107
lazy val client = (project in file("client")).settings(
@@ -137,15 +129,7 @@ lazy val client = (project in file("client")).settings(
137129
),
138130
stIgnore ++= List("moment", "moment-timezone", "bootstrap", "chart.js", "chartjs-adapter-moment",
139131
"comma-separated-values"),
140-
).enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin, ScalablyTypedConverterPlugin)//.dependsOn(sharedJs)
141-
142-
/*lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).
143-
settings(scalaVersion := scalaV).
144-
jsConfigure(_ enablePlugins ScalaJSWeb)
145-
146-
lazy val sharedJvm = shared.jvm
147-
lazy val sharedJs = shared.js*/
148-
132+
).enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin, ScalablyTypedConverterPlugin)
149133

150134
name := "zbdb-stats"
151135

project/plugins.sbt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// Comment to get more information during initialization
22
logLevel := Level.Warn
33

4-
// Resolvers
5-
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
6-
7-
resolvers += Resolver.url("heroku-sbt-plugin-releases",
8-
url("https://dl.bintray.com/heroku/sbt-plugins/"))(Resolver.ivyStylePatterns)
9-
104
// Sbt plugins
115
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.20")
126

0 commit comments

Comments
 (0)