{"name":"module-lookup-amd","version":"5.0.2","keywords":["amd","module","lookup","alias"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"module-lookup-amd@5.0.2","maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"homepage":"https://github.com/mrjoelkemp/node-module-lookup-amd","bugs":{"url":"https://github.com/mrjoelkemp/node-module-lookup-amd/issues"},"bin":{"lookup-amd":"bin/cli.js"},"dist":{"shasum":"c3e21c54f6d848da051a182ee117683ad47642eb","tarball":"http://registry-npm.ywwl.com/module-lookup-amd/download/module-lookup-amd-5.0.2.tgz","fileCount":4,"integrity":"sha512-lOyf83SGq+gE0ElfuyCVFqpl9NqKFxfz7Yj+1crSmf7ozAHEkWIqeDTT4z1+2VOXYhxLcXCJF1XFpWU7y1KtaA==","signatures":[{"sig":"MEYCIQC6tiZyCM9Mo6RvGrO3sIBy5/tmPZxnPcyaohtnM5pEiAIhAI6MShSyRLxTC9pWK6bwAzeYKLGxpOCDbLlrvBPlRJne","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEHWdCRA9TVsSAnZWagAACbsP/RtOPzZgQNRi9Al1Io5p\nocB3b6wllkLaittr1n4xYGwa9mKUe0YeLyrqqZESt2NG5zWmC8bWBfYq6l0s\nL7HFhdUM6AD3swBHzP58YviD3LHdcOovz2p2iDa/fnHbxa0Zbqdr3nWKmdTK\nQxRVuhqC+424dKcbkjGTygGBdR3E3nkVHaE4TpXyutn3kl+UHStD5MOFgNuD\nX78KpXyXR04bibvUCfNyKc/B05Wz7w7hWhLl1YqQVDSIEwLJfYX9rrtTOaPp\naJpGQxohYrKyXLxrpa9mKWM5z0kUFGzLGqmmB14+gF26YZC7NFSU4Iedhr16\nubdnnrtde63pu9GWW9qI2ZQiPi52W0quSnJL6Wcuay40zIh3Egi+T6/8X4GV\nzJwMl+/kDd+dC1BvrJFekKUYn9HZtEwCcnHUlIe4sxW1rf/4B5Dj1MhxlT/W\n3ZBLVJr2ngRiA/+DmUpaNvi4mh3v2wafq0+L5GpK751vO3+8iOuiILv+gM/T\n2Nvg3mMx9z58r/0jgppmN9ftsUBlQx0l1DqYUhcCz8qGtevzf7QSPA6diECN\nD3bgg4iKJRAHZvIrLXvceXzP2C8W83jwwVfr72kC873TsucDujwpDNorF+1U\nOiTfaZFshIBXgs9GtJapGulXu1cvU9j1lV7FWDkldJ8BPbdFdoqgq9+iuCtT\n2+43\r\n=LmCj\r\n-----END PGP SIGNATURE-----\r\n","size":3076,"noattachment":false,"key":"/module-lookup-amd/-/module-lookup-amd-5.0.2.tgz"},"main":"index.js","engines":{"node":">=4.0.0"},"gitHead":"95d303511ad875c2e82d73ebd387e9981a1527fe","scripts":{"test":"jscs index.js test bin && ./node_modules/.bin/mocha --compilers js:babel/register test/test.js"},"_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"repository":{"url":"git+https://github.com/mrjoelkemp/node-module-lookup-amd.git","type":"git"},"_npmVersion":"6.4.1","description":"Resolve aliased dependency paths using a RequireJS config","directories":{},"_nodeVersion":"8.12.0","dependencies":{"find":"^0.2.8","debug":"^3.1.0","commander":"^2.8.1","requirejs":"^2.3.5","file-exists":"^2.0.0","requirejs-config-file":"3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jscs":"~2.11.0","babel":"~5.8.38","mocha":"^4.1.0","sinon":"^4.1.3","rewire":"^3.0.2","jscs-preset-mrjoelkemp":"~1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-lookup-amd_5.0.2_1544582557274_0.08809411961261415","host":"s3://npm-registry-packages"},"readme":"# module-lookup-amd\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-module-lookup-amd/ci.yml?branch=main&label=CI&logo=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&logoColor=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> 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://packagecontrol.io/packages/Dependents) [jump to dependency](https://github.com/dependents/Dependents) 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### ESM\n\n```js\nimport lookup from '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  configPath: 'path/to/config/directory', // optional\n  fileSystem: {} // optional\n});\n```\n\n### CommonJS\n\n```js\nconst { default: lookup } = require('module-lookup-amd');\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 `configPath` or `directory` argument which is assumed to be the location where your config would have been.\n* `configPath`: path to the config file (or its directory) used to determine the module resolution directory; inferred automatically when `config` is a string path\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","publish_time":1544582557436,"_cnpm_publish_time":1544582557436,"dist-tags":{"latest":"10.0.1"}}