pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/dannyfritz/node-resolve-lua

ia="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-ee6184595cc59cb2.css" /> GitHub - dannyfritz/node-resolve-lua: Implement the node-resolve module resolution pattern in Lua.
Skip to content

dannyfritz/node-resolve-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-resolve-lua

npm npm

Implements node's require.resolve module resolution pattern for Lua.

This allows you to install Lua packages from npm and require them like normal modules.

All of the features of npm will come with using this pattern.

  • Semantic Versioning of modules
  • Modules installed locally, not globally
  • Manage installed modules in a package.json file
  • npm scripts
  • Tons more

Usage

npm uses this pattern when it installs modules. So let's use npm! installing npm

In your project directory, we need to install node-resolve-lua:

$ npm install node-resolve-lua
--Only needs to be done once
require("./node_modules/node-resolve-lua/node-resolve")

And that's it! You're ready to include modules from npm now.

Example Usage

If we wanted to use a module from npm such as luadash, we would do this:

$ npm install luadash
local __ = require("luadash")

function double (value)
  return value * 2
end

__.map(double, {1, 2, 3}) -- => {2, 4, 6}

About

Implement the node-resolve module resolution pattern in Lua.

Resources

Stars

Watchers

Forks

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy