Skip to content

Remove globals

Compare
Choose a tag to compare
@Sasszem Sasszem released this 19 Aug 21:59
· 1 commit to master since this release

Removed the previous pollution of the global namespace.

WARNING! THIS CAN BREAK COMPATIBILITY!

Now instead of

require("yalg")

local G = GUI(VDiv(...

You do like this:

local Y = require("yalg")

local G = Y.GUI(Y.VDiv(...

To update, you should look for:

  • GUI
  • VDiv and HDiv
  • Button and Label
  • Switcher
  • Font and rgb

There's an easy convenience fix for kind-of backward-compatibility:

require("yalg").import()
local G = GUI(VDiv(...

This simply copies into the global namespace, which is NOT recommended, and only there for backwards compatibility!

Also added a "nice" build script to automate copying the files into one. It's ugly af, but works...