Package Management: node-resolve-lua

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO

Package Management: node-resolve-lua

Post by TechnoCat » Sat Dec 26, 2015 6:15 pm


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
In the root of your project folder, install a module such as luadash with:

Code: Select all

$ npm install luadash
Then to use it:

Code: Select all

local __ = require("luadash")
function double (value)
  return value * 2
end, {1, 2, 3}) -- => {2, 4, 6}
Now here are some reasons this is not particularly cool:
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests