improved nim structure

This commit is contained in:
2018-03-17 10:49:56 +01:00
parent 4a4c1cfc63
commit 2badffe64b
6 changed files with 5 additions and 12 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "nim/htmlutils"]
path = nim/htmlutils
path = nim/lib/htmlutils
url = ssh://oggio88.soon.it:1122/mnt/git/htmlutils

View File

@@ -53,21 +53,13 @@ val compileNim = TaskKey[File]("compileNim", "Compile nim code of web interface"
compileNim :=
{
val result = new File("nim/nimcache/jpacrepo.js")
val cmd = s"nim js -d:release -d:serverURL= nim/jpacrepo.nim"
val cmd = s"nim js -d:release -d:serverURL= nim/src/jpacrepo.nim"
println(cmd)
sys.process.stringToProcess(cmd).! match
{
case 0 =>
case _ => throw new RuntimeException("Error occurred during deploy")
}
// val outfile = (baseDirectory.value / "nim" / "nimcache" / "jpacrepo.min.js").toString
// val closureCmd = s"closure-compiler --strict_mode_input=false -O ADVANCED --language_in ECMASCRIPT5 --language_out ECMASCRIPT5 --js_output_file=${outfile} ${result.getAbsolutePath}"
// println(closureCmd)
// sys.process.stringToProcess(closureCmd).! match
// {
// case 0 =>
// case _ => throw new RuntimeException("Error occurred during deploy")
// }
result
}

View File

@@ -1,4 +1,4 @@
#!/bin/bash
set -e
nim js jpacrepo.nim
cp nimcache/jpacrepo.js static
nim js src/jpacrepo.nim
cp nimcache/jpacrepo.js static

1
nim/nim.cfg Normal file
View File

@@ -0,0 +1 @@
path="lib"