summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-17 13:57:22 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-20 20:45:26 +0200
commit9a74b811f007986a3e6015af0c06b33147d05951 (patch)
tree43e794cb1f35582c98eab8f8a1f4d54299cf2557 /lib
parent2601b1e17f5ba2e15fb16e126ec5d22a39246649 (diff)
eval: implement -m option to preload modules
The -m option instructs the interpreter to automatically require the named module and to register the module context as global variable. The following two commands are equivalent, with the former one serving as a shortcut for the latter: utpl -m fs -s '{{ fs.open("test.txt").read("all") }}' utpl -s '{% fs = require("fs"); print(fs.open("test.txt").read("all")) %}' Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions