{"id":19123406,"url":"https://github.com/dependents/node-module-lookup-amd","last_synced_at":"2025-04-05T18:07:12.297Z","repository":{"id":21546692,"uuid":"24866298","full_name":"dependents/node-module-lookup-amd","owner":"dependents","description":"Resolve aliased dependency paths using a RequireJS config","archived":false,"fork":false,"pushed_at":"2025-02-02T08:01:26.000Z","size":606,"stargazers_count":6,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T17:07:33.056Z","etag":null,"topics":["requirejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dependents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2014-10-06T21:48:28.000Z","updated_at":"2025-02-02T08:01:30.000Z","dependencies_parsed_at":"2024-06-18T16:43:48.930Z","dependency_job_id":"f31055fd-da58-4199-9f5e-cc68f2a18917","html_url":"https://github.com/dependents/node-module-lookup-amd","commit_stats":{"total_commits":80,"total_committers":11,"mean_commits":"7.2727272727272725","dds":0.575,"last_synced_commit":"6fa18974204f7ddda19f9516e7b341ed134eeab1"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-module-lookup-amd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-module-lookup-amd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-module-lookup-amd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-module-lookup-amd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dependents","download_url":"https://codeload.github.com/dependents/node-module-lookup-amd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378141,"owners_count":20929296,"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":["requirejs"],"created_at":"2024-11-09T05:25:33.119Z","updated_at":"2025-04-05T18:07:12.271Z","avatar_url":"https://github.com/dependents.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# module-lookup-amd\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-module-lookup-amd/ci.yml?branch=main\u0026label=CI\u0026logo=github)](https://github.com/dependents/node-module-lookup-amd/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/module-lookup-amd?logo=npm\u0026logoColor=fff)](https://www.npmjs.com/package/module-lookup-amd)\n[![npm downloads](https://img.shields.io/npm/dm/module-lookup-amd)](https://www.npmjs.com/package/module-lookup-amd)\n\n\u003e Resolve AMD dependency paths to an absolute path on the filesystem\n\nThis module takes in a partial and *synchronously* gives back its absolute path on the filesystem.\n\nI built this for [Dependents'](https://sublime.wbond.net/packages/Dependents) [jump to dependency](https://github.com/dependents/Dependents#jump-to-a-dependency) feature that lets you click on a module name\nand open the relevant file.\n\n```sh\nnpm install module-lookup-amd\n```\n\n## Usage\n\n```js\nconst lookup = require('module-lookup-amd');\n\nconst realPath = lookup({\n  partial: 'someModule',\n  filename: 'file/containing/partial',\n  directory: 'path/to/all/js/files', // optional\n  config: 'path/to/my/requirejs/config', // optional\n  fileSystem: {} // optional\n});\n```\n\n* `partial`: the dependency that you want to lookup\n* `filename`: the path of the file that contains the dependency (i.e., parent module)\n* `directory`: Used to resolve files if you're not using a requirejs config\n* `config`: the path to your RequireJS configuration file\n  * As an optimization, you can provide a pre-parsed config object (the contents of the RequireJS config in object form)\n  as `config`. You are then required to provide a `directory` argument which is assumed to be the location where your config would have been.\n* `fileSystem`: An alternative `fs` implementation to use for filesystem interactions. Defaults to Node.js's `fs` implementation if not supplied.\n\n## CLI\n\nAssumes a global `-g` installation\n\n```sh\nlookup-amd -c path/to/my/config.js -f path/to/file/containing/dependency -d path/containing/all/files my/dependency/name\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdependents%2Fnode-module-lookup-amd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdependents%2Fnode-module-lookup-amd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdependents%2Fnode-module-lookup-amd/lists"}