From aeee691dcc15bfd13381a6573f200168e553b91f Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Thu, 25 May 2017 15:07:50 -0500 Subject: [PATCH] Updated Using nimscript for configuration (markdown) --- Using-nimscript-for-configuration.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Using-nimscript-for-configuration.md b/Using-nimscript-for-configuration.md index b807a3b..46d69a9 100644 --- a/Using-nimscript-for-configuration.md +++ b/Using-nimscript-for-configuration.md @@ -1,4 +1,6 @@ -The [nimscript docs](https://nim-lang.org/docs/nimscript.html) describe the nimscript API, but I needed some help on how to use it. (Most of the following applies to nimble too, but let's concentrate on nimscript for now.) +The [nimscript docs](https://nim-lang.org/docs/nimscript.html) describe the nimscript API, but I needed some help on how to use it. (Note: [these docs](https://nim-lang.org/docs/nims.html) are better.) + +(Most of the following applies to nimble too, but let's concentrate on nimscript for now.) ### Example Suppose you have a scrDir like this: @@ -37,5 +39,6 @@ Instead, run **nim** on `foo.nim` like this: nim newtask foo nim mybuild -d:debug foo + nim tasks foo # to see a list of available tasks -All the [standard `.cfg` files](https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files) are read *before* your nimscript. You can use `include` to avoid repeating code for each tool-specific `.nims` file. That's not quite as convenient as a global `nim.cfg` file, but it's more flexible. \ No newline at end of file +All the [standard `.cfg` files](https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files) are read *before* your nimscript. You can use `include` to avoid repeating code for each tool-specific `.nims` file. You can also use a directory-global `config.nims` nimscript, similar to `nim.cfg`. \ No newline at end of file