I made a way to manage dependencies and libraries with npm. It is decently cool.
Here are some reasons this is particularly cool:
- npm will manage your modules locally per project. No more global modules!
- Modules use semantically versioned so you can get the latest compatible version
- npm is heavily maintained and tested
Code: Select all
$ npm install luadash
Code: Select all
local __ = require("luadash")
function double (value)
return value * 2
end
__.map(double, {1, 2, 3}) -- => {2, 4, 6}
- There aren't really any Lua modules hosted on npm right now
- npm isn't really a place to store Lua modules
- Not particularly battle-tested
- Requires Node.js to be installed to manage dependencies. Does not need to be installed to run your project