{"name":"module-lookup-amd","version":"6.1.0","keywords":["amd","module","lookup","alias"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"module-lookup-amd@6.1.0","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":"0bb7ac446cc9e9f19df55115634d8862d2a5acad","tarball":"http://registry-npm.ywwl.com/module-lookup-amd/download/module-lookup-amd-6.1.0.tgz","fileCount":4,"integrity":"sha512-XHfR+eeiqsdZgkxIgWg9r2OHyk1QAjJKYCJWv6LJw1mY+lm0LVsftyike3pqlPivsqImiR6f7NBMhgMKnbdtiw==","signatures":[{"sig":"MEQCIEAAqR92KFMfAygF22Tt7gUgUypnSN9+W0vEQHNWiSwEAiBWRwcaQHAvukcd2MNyIwFKDzwfEkzZJ4/LUbCx2IEsMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFpaOCRA9TVsSAnZWagAAuFEP/is1qvKG3VikD5UMbcRT\n348QHrRO5+l/xZnO7IRQEc5qYpgrlKYfQhq9LiEqbaFBPq+sDlTOF3/kgHMx\nr+QQP1wKLk3Ki5yJB6/Iy7F284N93JWgRWKyc7gkzqZRTPBuR2ksrJFDzbt9\nbWi0NNFWYwnpGSlJFN6XflBVQXxyje3sfJY+i0xPUZHLLeuLgbZonybpPqW6\nHN8RRdjaykfcV2LOHGy6ISpyNbTqbWS7zbvWGu17lc28gy9bdntmQ/1SiahB\n7MTX2x0cfwKlsB860/jm7uPD7HEVzUbdk2m/D7H5rVpOsG2Qze3J74OuhZc3\nYDuJW5836WdeSn53iMli7YRarLkamOa+JYByKjy7wXzhPNaJFQKojnv/Jevd\nufBebK+edtR7Wvp/AdxaVUKdSPY9XgqhKU0V54D/ImZk5sYgsxdsHqaY6VdU\nJMNQ75wq8QcCntMT1JtOioDeVkL15o8zGkb9Au/Zi2aPpAixTKKDjtNRGzLi\nan7d1POeLgLejYS3wc49cgyF+4UPW2Veqn1aWdWCElyTsLggWAsIqT86ZYIT\nZJI7UVFHlhgR0KV9Kvf8w9xE2k3onj8TL8/IgHnw+EVMt6wvvd8CNcvwSyhz\n/yVhwsHzHC9ZWCaIToHmgix26xBl8eaO2YyUXFb33/pDBc8gbdmobf5CAvsf\nd3gk\r\n=PEw+\r\n-----END PGP SIGNATURE-----\r\n","size":3256,"noattachment":false,"key":"/module-lookup-amd/-/module-lookup-amd-6.1.0.tgz"},"main":"index.js","engines":{"node":">=6.0.0"},"gitHead":"ef728b67076b5ef7ebb445c3b21b6d3607bb6d6d","scripts":{"test":"jscs index.js test bin && mocha 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":"^4.1.0","commander":"^2.8.1","requirejs":"^2.3.5","file-exists":"^5.0.1","requirejs-config-file":"^3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"jscs":"~2.11.0","mocha":"^5.2.0","sinon":"^7.2.0","rewire":"^4.0.1","jscs-preset-mrjoelkemp":"~1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-lookup-amd_6.1.0_1544984206443_0.35373794541388226","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":1544984206554,"_cnpm_publish_time":1544984206554,"dist-tags":{"latest":"10.0.1"}}