NimScript: prepare for future Nimble improvements; should be completely compatible with old and upcoming Nimble versions
This commit is contained in:
parent
0daca5c463
commit
77d5d0cdfe
1 changed files with 21 additions and 19 deletions
|
|
@ -293,7 +293,9 @@ template task*(name: untyped; description: string; body: untyped): untyped =
|
||||||
setCommand "nop"
|
setCommand "nop"
|
||||||
`name Task`()
|
`name Task`()
|
||||||
|
|
||||||
var
|
when not defined(nimble):
|
||||||
|
# nimble has its own implementation for these things.
|
||||||
|
var
|
||||||
packageName* = "" ## Nimble support: Set this to the package name. It
|
packageName* = "" ## Nimble support: Set this to the package name. It
|
||||||
## is usually not required to do that, nims' filename is
|
## is usually not required to do that, nims' filename is
|
||||||
## the default.
|
## the default.
|
||||||
|
|
@ -310,7 +312,7 @@ var
|
||||||
requiresData*: seq[string] = @[] ## Exposes the list of requirements for read
|
requiresData*: seq[string] = @[] ## Exposes the list of requirements for read
|
||||||
## and write accesses.
|
## and write accesses.
|
||||||
|
|
||||||
proc requires*(deps: varargs[string]) =
|
proc requires*(deps: varargs[string]) =
|
||||||
## Nimble support: Call this to set the list of requirements of your Nimble
|
## Nimble support: Call this to set the list of requirements of your Nimble
|
||||||
## package.
|
## package.
|
||||||
for d in deps: requiresData.add(d)
|
for d in deps: requiresData.add(d)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue