diff --git a/src/sbt-test/sbt-web/asset-pipeline/build.sbt b/src/sbt-test/sbt-web/asset-pipeline/build.sbt index 735607b..299af6d 100644 --- a/src/sbt-test/sbt-web/asset-pipeline/build.sbt +++ b/src/sbt-test/sbt-web/asset-pipeline/build.sbt @@ -31,7 +31,7 @@ jsmin := { val minFile = targetDir / "js" / "all.min.js" IO.touch(minFile) val minMappings = Seq(minFile) pair Path.relativeTo(targetDir) - val convertedMinMappings = minMappings.map{ case (file, path) => + val convertedMinMappings = minMappings.map { case (file, path) => SbtWeb.asFileRef(file, fileConverter.value) -> path } convertedMinMappings ++ other @@ -43,4 +43,4 @@ pipelineStages := Seq(jsmin) TaskKey[Unit]("fileCheck") := { assert((target.value / "jsmin" / "public" / "js" / "all.min.js").exists()) assert((target.value / "web" / "stage" / "coffee" / "a.coffee").exists()) -} \ No newline at end of file +} diff --git a/src/sbt-test/sbt-web/deduplicate/build.sbt b/src/sbt-test/sbt-web/deduplicate/build.sbt index 6522522..684d8f8 100644 --- a/src/sbt-test/sbt-web/deduplicate/build.sbt +++ b/src/sbt-test/sbt-web/deduplicate/build.sbt @@ -3,5 +3,8 @@ lazy val root = (project in file(".")).enablePlugins(SbtWeb) Assets / WebKeys.deduplicators += SbtWeb.selectFileFrom((Assets / sourceDirectory).value) TaskKey[Unit]("fileCheck") := { - assert(( target.value / "web" / "public" / "main" / "js" / "a.js" ).exists(), "Could not find 'web/public/main/js/a.js'") -} \ No newline at end of file + assert( + (target.value / "web" / "public" / "main" / "js" / "a.js").exists(), + "Could not find 'web/public/main/js/a.js'" + ) +} diff --git a/src/sbt-test/sbt-web/dev-pipeline/build.sbt b/src/sbt-test/sbt-web/dev-pipeline/build.sbt index 76460a0..8f5fc7f 100644 --- a/src/sbt-test/sbt-web/dev-pipeline/build.sbt +++ b/src/sbt-test/sbt-web/dev-pipeline/build.sbt @@ -25,6 +25,12 @@ jsTransform := { Assets / pipelineStages := Seq(jsTransform) TaskKey[Unit]("fileCheck") := { - assert(!( target.value / "web" / "public" / "main" / "js" / "a.js" ).exists(), "Found 'web/public/main/js/a.js', which should not exist.") - assert(( target.value / "web" / "public" / "main" / "js" / "a.new.js" ).exists(), "Could not find 'web/public/main/js/a.new.js'") -} \ No newline at end of file + assert( + !(target.value / "web" / "public" / "main" / "js" / "a.js").exists(), + "Found 'web/public/main/js/a.js', which should not exist." + ) + assert( + (target.value / "web" / "public" / "main" / "js" / "a.new.js").exists(), + "Could not find 'web/public/main/js/a.new.js'" + ) +} diff --git a/src/sbt-test/sbt-web/exclude-hidden-files/build.sbt b/src/sbt-test/sbt-web/exclude-hidden-files/build.sbt index 42b16c5..f072fa7 100644 --- a/src/sbt-test/sbt-web/exclude-hidden-files/build.sbt +++ b/src/sbt-test/sbt-web/exclude-hidden-files/build.sbt @@ -1,5 +1,8 @@ lazy val root = (project in file(".")).enablePlugins(SbtWeb) TaskKey[Unit]("fileCheck") := { - assert(!( target.value / "web" / "public" / "main" / ".svn" / "entries" ).exists(), "Found private directory, which should have been excluded.") + assert( + !(target.value / "web" / "public" / "main" / ".svn" / "entries").exists(), + "Found private directory, which should have been excluded." + ) } diff --git a/src/sbt-test/sbt-web/extract-web-jars/build.sbt b/src/sbt-test/sbt-web/extract-web-jars/build.sbt index ebf9acc..48fa53f 100644 --- a/src/sbt-test/sbt-web/extract-web-jars/build.sbt +++ b/src/sbt-test/sbt-web/extract-web-jars/build.sbt @@ -12,15 +12,15 @@ libraryDependencies ++= Seq( //-$ exists target/web/public/main/lib/requirejs/require.js TaskKey[Unit]("fileCheckAssets") := { assert( - ( target.value / "web" / "public" / "main" / "lib" / "jquery" / "jquery.js" ).exists(), + (target.value / "web" / "public" / "main" / "lib" / "jquery" / "jquery.js").exists(), "Could not find jquery.js" ) assert( - ( target.value / "web" / "public" / "main" / "lib" / "prototype" / "prototype.js" ).exists(), + (target.value / "web" / "public" / "main" / "lib" / "prototype" / "prototype.js").exists(), "Could not find prototype.js" ) assert( - !( target.value / "web" / "public" / "main" / "lib" / "requirejs" / "require.js" ).exists(), + !(target.value / "web" / "public" / "main" / "lib" / "requirejs" / "require.js").exists(), "Found requirejs, which should have been excluded." ) @@ -29,7 +29,7 @@ TaskKey[Unit]("fileCheckAssets") := { //$ exists target/web/node-modules/main/webjars/less/package.json TaskKey[Unit]("fileCheckNode") := { assert( - ( target.value / "web" / "node-modules" / "main" / "webjars" / "less" / "package.json" ).exists(), + (target.value / "web" / "node-modules" / "main" / "webjars" / "less" / "package.json").exists(), "Could not find node webjars" ) } @@ -38,7 +38,8 @@ TaskKey[Unit]("fileCheckNode") := { //$ newer target/foo target/web/public/main/lib/jquery/jquery.js TaskKey[Unit]("checkJqueryTimestamp") := { assert( - (baseDirectory.value / "target" / "foo" ).lastModified() > (target.value / "web" / "public" / "main" / "lib" / "jquery" / "jquery.js" ).lastModified(), + (baseDirectory.value / "target" / "foo") + .lastModified() > (target.value / "web" / "public" / "main" / "lib" / "jquery" / "jquery.js").lastModified(), "target/foo was not newer than jquery.js" ) } @@ -49,15 +50,15 @@ TaskKey[Unit]("checkJqueryTimestamp") := { //$ exists target/web/web-modules/test/webjars/lib/prototype/prototype.js TaskKey[Unit]("checkTestAssets") := { assert( - ( target.value / "web" / "web-modules" / "test" / "webjars" / "lib" / "requirejs" / "require.js" ).exists(), + (target.value / "web" / "web-modules" / "test" / "webjars" / "lib" / "requirejs" / "require.js").exists(), "Could not find requirejs webjars in test" ) assert( - ( target.value / "web" / "web-modules" / "test" / "webjars" / "lib" / "jquery" / "jquery.js" ).exists(), + (target.value / "web" / "web-modules" / "test" / "webjars" / "lib" / "jquery" / "jquery.js").exists(), "Could not find jquery webjars in test" ) assert( - ( target.value / "web" / "web-modules" / "test" / "webjars" / "lib" / "prototype" / "prototype.js" ).exists(), + (target.value / "web" / "web-modules" / "test" / "webjars" / "lib" / "prototype" / "prototype.js").exists(), "Could not find prototype webjars in test" ) } @@ -68,15 +69,15 @@ TaskKey[Unit]("checkTestAssets") := { //$ exists target/web/public/test/lib/requirejs/require.js TaskKey[Unit]("checkTestLibs") := { assert( - ( target.value / "web" / "public" / "test" / "lib" / "requirejs" / "require.js" ).exists(), + (target.value / "web" / "public" / "test" / "lib" / "requirejs" / "require.js").exists(), "Could not find requirejs library in test" ) assert( - ( target.value / "web" / "public" / "test" / "lib" / "jquery" / "jquery.js" ).exists(), + (target.value / "web" / "public" / "test" / "lib" / "jquery" / "jquery.js").exists(), "Could not find jquery library in test" ) assert( - ( target.value / "web" / "public" / "test" / "lib" / "prototype" / "prototype.js" ).exists(), + (target.value / "web" / "public" / "test" / "lib" / "prototype" / "prototype.js").exists(), "Could not find prototype library in test" ) }