From 92511f246449b276da71897a69a795555ef1d5ad Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 14 Nov 2024 14:37:18 -0600 Subject: [PATCH] add more helper tasks --- home/private_dot_config/nim/config.nims | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/home/private_dot_config/nim/config.nims b/home/private_dot_config/nim/config.nims index e616324..583b4c0 100644 --- a/home/private_dot_config/nim/config.nims +++ b/home/private_dot_config/nim/config.nims @@ -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