materialize_karax_jester.nimble 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Package
  2. version = "0.1.0"
  3. author = "NerdRat"
  4. description = "A template to develop web applications using materialize, karax and jester."
  5. license = "GPL-3.0"
  6. srcDir = "src"
  7. bin = @["materialize_karax_jester"]
  8. # Dependencies
  9. requires "nim >= 1.0.6"
  10. requires "karax#7440393"
  11. requires "jester#d8a03aa"
  12. requires "zip#2193d0b"
  13. task clean, "Clean built files.":
  14. if fileExists bin[0]:
  15. rmFile bin[0]
  16. if fileExists "assets":
  17. rmFile "assets"
  18. rmDir "src/client/assets"
  19. if dirExists "public":
  20. rmDir "public"
  21. if fileExists "configure":
  22. rmFile "configure"
  23. task getAssets, "Retrieve vendor assets.":
  24. if not fileExists("assets"):
  25. exec "nimble c -d:ssl src/assets.nim -o:./assets"
  26. if not dirExists("src/client/assets"):
  27. exec "./assets get extract"
  28. else:
  29. echo "You have already done that."
  30. task buildFrontend, "Fetch external assets and build frontend code.":
  31. if not dirExists "public":
  32. mkDir "public/js"
  33. exec "nimble js --o:public/js/application.js src/client/application.nim"
  34. task configure, "Configure for specific project.":
  35. selfExec "configure.nims"