summaryrefslogtreecommitdiff
path: root/example/staticFiles2/build.sc
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2019-10-09 10:58:39 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2019-10-09 10:58:39 +0800
commit96375271d90541c89f9f72098df14097e8b4cc3b (patch)
treed4974b99c8409938acf43de7be86303ebf11ee5a /example/staticFiles2/build.sc
parent70dbe3ed561172a80ebff0515e727434b03040bf (diff)
downloadcask-96375271d90541c89f9f72098df14097e8b4cc3b.tar.gz
cask-96375271d90541c89f9f72098df14097e8b4cc3b.tar.bz2
cask-96375271d90541c89f9f72098df14097e8b4cc3b.zip
Add example of setting static file headers, compressing static files
Diffstat (limited to 'example/staticFiles2/build.sc')
-rw-r--r--example/staticFiles2/build.sc25
1 files changed, 25 insertions, 0 deletions
diff --git a/example/staticFiles2/build.sc b/example/staticFiles2/build.sc
new file mode 100644
index 0000000..e0f8519
--- /dev/null
+++ b/example/staticFiles2/build.sc
@@ -0,0 +1,25 @@
+import mill._, scalalib._
+
+
+trait AppModule extends ScalaModule{
+ def scalaVersion = "2.13.0"
+
+ def forkWorkingDir = build.millSourcePath
+ def ivyDeps = Agg[Dep](
+ )
+ object test extends Tests{
+ def testFrameworks = Seq("utest.runner.Framework")
+
+ def ivyDeps = Agg(
+ ivy"com.lihaoyi::utest::0.7.1",
+ ivy"com.lihaoyi::requests::0.2.0",
+ )
+
+ def forkWorkingDir = build.millSourcePath
+
+ // redirect this to the forked `test` to make sure static file serving works
+ def testLocal(args: String*) = T.command{
+ test(args:_*)
+ }
+ }
+} \ No newline at end of file