{"name":"module-lookup-amd","version":"7.0.1","keywords":["amd","module","lookup","alias"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"module-lookup-amd@7.0.1","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":"d67c1a93f2ff8e38b8774b99a638e9a4395774b2","tarball":"http://registry-npm.ywwl.com/module-lookup-amd/download/module-lookup-amd-7.0.1.tgz","fileCount":4,"integrity":"sha512-w9mCNlj0S8qviuHzpakaLVc+/7q50jl9a/kmJ/n8bmXQZgDPkQHnPBb8MUOYh3WpAYkXuNc2c+khsozhIp/amQ==","signatures":[{"sig":"MEQCIDJmbfYIx7MsGB+1/XYohB2U7eYm2kjR84oxHR498N1wAiBm7E7E1Y8lRgWbJWplfoCJp6f3YOvU937VRJZsbl4j7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4NMjCRA9TVsSAnZWagAAG1oP/01SzimK3+U86dEGbtl2\nNos2R/IIqxupLUjIcsIcXP1v0jAtsvLAy/I18fs+WBjfFhbIAxvapQ7yMSXp\nl0ZiUw39FGHFCGSAbtPBvN8JAkPWsStvfC/r2yl9VkXsGA6loqR9lQVVtmkR\nW/kG29gXNtYs5pKr50o9hPaGsWs7uY7dOWPXiCleV4DMQmWbRdUKBaw9cV4n\nNBUy7ig+wQHmR3B9k3s3r4WSi216ODbncrxqa6d7FfwHuYOxwbmC/vrEuIAu\nWskamWi/JYDkVH8kANqX+EqQ07AnRJaww1smqJ2GCFWyRyXSr1+3bH1JU8XF\nREcxPpY+89PZH0X0xUkM99zarq4mFlrL/EujBthGKHqnAHNLD5T6ohwtX+vg\nf2qykh3qtw7dYRLKepZE/7TvfgCr2cNJJGecVJ+nixiJc0jq4ZGIlQ+Mj+6g\nMIUodMTtp01q9x/U68xGnzhVrA5ojTOloYYux862cIEPF+Yk/YgqeRvnhqwx\na4eJMT2YeanLN1veizRRCsNYdpybtBC91vZslrWL6MzQgyx6S6GvL5nKcmpu\naAswNA232i349OluxBTBTT0LypwJEJFGWKDbV6XkFWE5CKIhEdaormLhn5Au\ntdZDzEmtT0A8MQ9KBe6EgOf5uL5aFaRve8gHasbvwRx3un0k9Une6FakBJzu\nJLlZ\r\n=4tmX\r\n-----END PGP SIGNATURE-----\r\n","size":3263,"noattachment":false,"key":"/module-lookup-amd/-/module-lookup-amd-7.0.1.tgz"},"main":"index.js","engines":{"node":">=10.13.0"},"gitHead":"61983798142e8cd27ad4e5c5bd16dbe9d7ee1bfe","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.14.9","description":"Resolve aliased dependency paths using a RequireJS config","directories":{},"_nodeVersion":"14.15.2","dependencies":{"glob":"^7.1.6","debug":"^4.1.0","commander":"^2.8.1","requirejs":"^2.3.5","requirejs-config-file":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jscs":"^3.0.7","mocha":"^8.2.1","sinon":"^9.2.1","jscs-preset-mrjoelkemp":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-lookup-amd_7.0.1_1608569635263_0.27981532829035705","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":1608569635445,"_cnpm_publish_time":1608569635445,"dist-tags":{"latest":"10.0.1"}}