{"id":15529938,"url":"https://github.com/hazzard993/star-node","last_synced_at":"2025-07-31T14:38:46.635Z","repository":{"id":97408762,"uuid":"298240753","full_name":"hazzard993/star-node","owner":"hazzard993","description":"Used to resolve relative Lua paths as well as paths to node_modules.","archived":false,"fork":false,"pushed_at":"2020-09-24T12:11:11.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T08:13:56.435Z","etag":null,"topics":["lua","luajit","module-resolver","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hazzard993.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-24T10:10:24.000Z","updated_at":"2020-09-24T12:14:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"17ba657d-3e30-47ad-baa7-fd987cfa40db","html_url":"https://github.com/hazzard993/star-node","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fstar-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fstar-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fstar-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fstar-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazzard993","download_url":"https://codeload.github.com/hazzard993/star-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106668,"owners_count":20724400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","luajit","module-resolver","nodejs"],"created_at":"2024-10-02T11:20:32.512Z","updated_at":"2025-03-28T21:43:46.951Z","avatar_url":"https://github.com/hazzard993.png","language":"TypeScript","readme":"# Lua Node Resolver\n\nAllows Lua to import `relative paths` as well as modules from `node_modules`.\n\n**How to install**\n\n```sh\nyarn add lua-star-node   # adds to node_modules/\n```\n\nImport `lnr.run` in Lua code before using other `require` calls.\n\nYou can use this if Lua's working directory is the same directory containing `node_modules`.\n\n```lua\n-- node_modules/\n-- main.lua\nrequire(\"node_modules.lua-star-node.run\")\n```\n\nor, if your Lua working directory is inside a folder, use the code below adjusting the dots as needed.\n\n```lua\n-- node_modules/\n-- folder/main.lua\npackage.path = package.path .. \";../node_modules/?.lua\"\nrequire(\"lua-star-node.run\")\n```\n\n**How the resolution works**\n\n```lua\n-- File Path:     C:/project/tools/main.lua\n\nrequire(\"./foo\")  --\u003e C:/project/tools/foo.lua\nrequire(\"../foo\") --\u003e C:/project/foo.lua\nrequire(\"foo\")    --\u003e C:/project/node_modules/module/internal/dir/foo.lua (this is discovered in a rockspec file)\n```\n\n**Examples**\n\n```sh\nyarn init -y\nyarn add rxi/lurker rxi/lume lua-star-node\necho \"require('node_modules.lua-star-node.run')\" \u003e main.lua\necho \"print(require('lurker'))\" \u003e\u003e main.lua\nlove --console .\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazzard993%2Fstar-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazzard993%2Fstar-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazzard993%2Fstar-node/lists"}