Adds new "outputFile" key to mfile, which when true causes muddler to write a .output file to the root of your project when it is done building. This file contains a simple json object with the package name and the file location.
Also adds a new Muddler mpackage you can install in Mudlet which allows for reloading muddler packages when they are built, by adding a filewatch for the .output file and using the pkgname/path to drive a basic lifecycle. This lifecycle is intended to be develop time only, which is to say things you want to have happen when testing the package which you don't necessarily want to happen on pkg removal/install on your users machine, such as test object setup or teardown, running test functions, etc.
The most basic of these might look like this:
myCIhelper = myCIhelper or Muddler:new({
path = "/home/demonnic/gitbox/MDK"
})
And is enough to cause Mudlet to uninstall and reinstall the MDK mpackage created when I run muddler in /home/demonnic/gitbox/MDK. All available options are:
path
the path to the muddler project. "/home/demonnic/gitbox/MDK" for example
watch
determines if it will start the watcher on instantiation, or can be checked to see if it is active
preremove
runs before pkg removal
function or codestring like tempTimer/etc
[[send("test")]]
function() send("test") end
postremove
like preremove, but after pkg removal
preinstall
like preremove, but before pkg install
postinstall
like preremove, but after pkg install
The actual helper for MDK I'm using right now is setup like this
local function killMDK()
for pkgName, _ in pairs(package.loaded) do
if pkgName:find("MDK") then
debugc("Uncaching lua package " .. pkgName)
package.loaded[pkgName] = nil
end
end
end
local function create_helper()
if MDKhelper then MDKhelper:stop() end
MDKhelper = Muddler:new({
path = "/home/demonnic/gitbox/MDK",
postremove = killMDK,
})
end
if not MDKhelper then
registerAnonymousEventHandler("sysLoadEvent", create_helper)
end
Adds new "outputFile" key to mfile, which when true causes muddler to write a .output file to the root of your project when it is done building. This file contains a simple json object with the package name and the file location.
Also adds a new Muddler mpackage you can install in Mudlet which allows for reloading muddler packages when they are built, by adding a filewatch for the .output file and using the pkgname/path to drive a basic lifecycle. This lifecycle is intended to be develop time only, which is to say things you want to have happen when testing the package which you don't necessarily want to happen on pkg removal/install on your users machine, such as test object setup or teardown, running test functions, etc.
The most basic of these might look like this:
And is enough to cause Mudlet to uninstall and reinstall the MDK mpackage created when I run muddler in
/home/demonnic/gitbox/MDK
. All available options are:"/home/demonnic/gitbox/MDK"
for exampleThe actual helper for MDK I'm using right now is setup like this
And the output in the error console