nimscript - import configuration file

2022-01-20 Thread alexgustafson
Nice, thanks for both examples. the include "settings.nims" is exactly what I need. good bye YAML, hello nim!

nimscript - import configuration file

2022-01-19 Thread exelotl
With a bit of `include` trickery you can actually use Nimscript as the config language (without the overhead of booting up the Nim compiler more than once). This is nice because you get proper typechecking and error messages, and you can use procs/templates to introduce additional rules and cons

nimscript - import configuration file

2022-01-19 Thread PMunch
You can use `readFile` from the OS module at least: import os echo readFile("test.nims") Run [peter /tmp ] 19055 $ nim e test.nims Hint: used config file '/home/peter/.choosenim/toolchains/nim-1.6.2/config/nim.cfg' [Conf] Hint: used config

nimscript - import configuration file

2022-01-19 Thread alexgustafson
Hi, We are using nimscript as a task runner for various (non nim ) projects. Typical tasks might be to deploying a docker based project to a remote server, or synchronizing data between local test servers and remote servers. I would like to be able to have a configuration file that is separate