add more helper tasks

This commit is contained in:
Daylin Morgan 2024-11-14 14:37:18 -06:00
parent b48499fbbd
commit 92511f2464
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -1,4 +1,6 @@
# import system/nimscript
when defined(nimsuggest):
import system/nimscript
import std/[
os, strutils, strformat
]
@ -99,7 +101,16 @@ task b, fmt"build binary, default: {name}":
else:
setCommand "c",""
task updateLock, "workaround for nimble lock probs":
let nimbleFile = projectDir().lastPathPart & ".nimble"
if not fileExists nimbleFile:
quit "expected to find: " & nimbleFile
rmDir "nimbledeps"
rmFile "nimble.lock"
exec "nimble lock -l"
exec "nimble setup -l"
# line delemiter for `nim help`
task _,"_______________":
discard