From 227c2f0ed83dda049173700ebfa39b664cc84065 Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 31 Jan 2020 14:54:19 +0100 Subject: comments, actual working things --- boot.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 boot.lua (limited to 'boot.lua') diff --git a/boot.lua b/boot.lua new file mode 100644 index 0000000..4226cba --- /dev/null +++ b/boot.lua @@ -0,0 +1,22 @@ +require 'moonscript' + +MODS = MODS or {} +-- table.insert(MODS, 'base') +-- table.insert(MODS, 'debug') +-- table.insert(MODS, 'math') +-- table.insert(MODS, 'time') + +for _,mod in ipairs(MODS) do + package.loaded[mod] = nil +end +for _,mod in ipairs(MODS) do + require(mod) +end +for k,v in pairs(require 'base') do + _G[k] = v +end + +function reload() + package.loaded.boot = nil + require 'boot' +end -- cgit v1.2.3