1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- # Package
- version = "0.1.0"
- author = "NerdRat"
- description = "A template to develop web applications using materialize, karax and jester."
- license = "GPL-3.0"
- srcDir = "src"
- bin = @["materialize_karax_jester"]
- # Dependencies
- requires "nim >= 1.0.6"
- requires "karax#7440393"
- requires "jester#d8a03aa"
- requires "zip#2193d0b"
- task clean, "Clean built files.":
- if fileExists bin[0]:
- rmFile bin[0]
- if fileExists "assets":
- rmFile "assets"
- rmDir "src/client/assets"
- if dirExists "public":
- rmDir "public"
- if fileExists "configure":
- rmFile "configure"
- task getAssets, "Retrieve vendor assets.":
- if not fileExists("assets"):
- exec "nimble c -d:ssl src/assets.nim -o:./assets"
- if not dirExists("src/client/assets"):
- exec "./assets get extract"
- else:
- echo "You have already done that."
- task buildFrontend, "Fetch external assets and build frontend code.":
- if not dirExists "public":
- mkDir "public/js"
- exec "nimble js --o:public/js/application.js src/client/application.nim"
- task configure, "Configure for specific project.":
- selfExec "configure.nims"
|