{"name":"stylus-lookup","version":"5.0.0","keywords":["stylus","lookup","dependency","partial"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"stylus-lookup@5.0.0","maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"}],"homepage":"https://github.com/dependents/node-stylus-lookup","bugs":{"url":"https://github.com/dependents/node-stylus-lookup/issues"},"xo":{"rules":{"curly":["error","multi-line"],"comma-dangle":["error","never"],"prefer-template":"error","arrow-body-style":"off","operator-linebreak":["error","after"],"capitalized-comments":"off","object-curly-spacing":["error","always"],"unicorn/prefer-module":"off","space-before-function-paren":["error","never"],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off","unicorn/prefer-top-level-await":"off"},"space":true,"ignores":["test/fixtures/*"]},"bin":{"stylus-lookup":"bin/cli.js"},"dist":{"shasum":"d828153ffb4f7c53b1068fd5d18f197f2fa11568","tarball":"http://registry-npm.ywwl.com/stylus-lookup/download/stylus-lookup-5.0.0.tgz","fileCount":5,"integrity":"sha512-9NV5GJO2L0PD6HICV67fYvAghS51kFnPW9paOsxl2NVsie8RzPMwqaXrOywt9Df+f5d9oIKPVQ6+hJmCMzulIQ==","signatures":[{"sig":"MEUCIE0xdLVazpvE1bvVH4GfNFyKqKRhw1+xk7Qd39MszF3IAiEAhQTKPkIlY4vo3ujQlcERQd6RTaiYF5HH2QsbSLMDcGE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVJkzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCnxAAhXFlW/Nv9NXjP0ajCbYDpQtEcyLxjoLEpVAl/xAp6Slw8AhO\r\nEdN4Bd6iT5FZJgU0t4JWVj5ipq6b//j/BPN1Si95G9XlX4E0CJd0wf8TdWGc\r\nmLRzieb2udvelkjVm4G1EHaMuyCWSi7yfvOueOzRhy8e5XoqiQqdjz90NP/x\r\n84nf1+NNnIskBkuQZPJZiKgBy6aelfKXirFDAheUORhOPSo39zPzT8txa0PR\r\nSlAz7DISLfKfora+wlaKFpFU3dU9WiW/6IMe+TF3alo6/E1QKPsKJbrPs5ft\r\nlAPUERNFzQfdWgcTbzSTJwbi07zVxtizNetgzTBY3VfFUMIGs4XHRAiAyyS5\r\nLqpANhS/cATyk1+GEWJa9DUO+4pDHiXTgcSa9SjLcOazJspvZx4qsf04mACX\r\nSeUxxov9j/v8TTbkuFfTePQWl1c+/p7yzHdEnutEERU0E2/kR7Qfy7i+cX8R\r\nvvXB/szUK//5JE7zsjFWOjPAVat5jOEC4ckSxbmYQEYnixGfYRJKTwr7G0Ha\r\negFVQ6zXgNkizBtsqC4e3zQimypIaoiM9OArCZQ2qPtj+E/KIhh0db3P1N8H\r\nSYjQKmWUjZNHiKMLHAIhEvENM4P6UMajAP1QqRG8KErYH85KxTwHLXk1yfz7\r\nbHzyjxaFAH2kKS6ii54Xw5h2n2aC/wxuQkw=\r\n=94y1\r\n-----END PGP SIGNATURE-----\r\n","size":3130,"noattachment":false,"key":"/stylus-lookup/-/stylus-lookup-5.0.0.tgz"},"main":"index.js","engines":{"node":">=14"},"gitHead":"a2944f1c1bfac6b647adfea0c61b198942f793f8","scripts":{"fix":"xo --fix","uvu":"uvu test -i fixtures","lint":"xo","test":"npm run lint && npm run uvu","test:ci":"c8 npm run uvu"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"repository":{"url":"git+https://github.com/dependents/node-stylus-lookup.git","type":"git"},"_npmVersion":"9.5.1","description":"Get the file associated with an imported/required Stylus partial","directories":{},"_nodeVersion":"18.16.0","dependencies":{"commander":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.13.0","xo":"^0.54.2","uvu":"^0.5.6","mock-fs":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/stylus-lookup_5.0.0_1683265842835_0.4408346528790519","host":"s3://npm-registry-packages"},"readme":"# stylus-lookup\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-stylus-lookup/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-stylus-lookup/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/stylus-lookup?logo=npm&logoColor=fff)](https://www.npmjs.com/package/stylus-lookup)\n[![npm downloads](https://img.shields.io/npm/dm/stylus-lookup)](https://www.npmjs.com/package/stylus-lookup)\n\n> Get the file associated with a Stylus import\n\nThis module replaces the Stylus compiler's lookup algorithm for resolving a partial's path.\n\n* Handles same directory lookups, partials with or without extensions, partials within subdirectories,\npartials with the `.styl` or `.css` in the name, partials using the `index.styl` resolution.\n* **Does not** currently support glob imports or the use of additional paths. PRs welcome.\n\n*Originally built for [Dependents](https://github.com/dependents/Dependents)*\n\n## Usage\n\nESM:\n\n```js\nimport stylusLookup from 'stylus-lookup';\n\nstylusLookup({\n  dependency: 'foo',\n  filename: 'path/to/file',\n  directory: 'path/to/all/files'\n});\n```\n\nCJS:\n\n```js\nconst { default: stylusLookup } = require('stylus-lookup');\n\nstylusLookup({\n  dependency: 'foo',\n  filename: 'path/to/file',\n  directory: 'path/to/all/files'\n});\n```\n\n* `dependency`: The partial's name\n  * If your stylus file had `@import foo`, then `foo` would be the dependency name\n* `filename`: The file importing the dependency\n* `directory`: The location of all stylus files\n\nExample:\n\n```js\nimport stylusLookup from 'stylus-lookup';\n\nstylusLookup({\n  dependency: 'variables',\n  filename: 'app/styles/styles.styl',\n  directory: 'app/styles'\n}); // yields app/styles/variables.styl\n```\n\n* This assumes that the file `app/styles/styles.styl` has `@import variables` or `@require variables`\nand that all of the other stylus files are located within `app/styles`.\n\n## CLI\n\nAssumes a global install of `stylus-lookup` with `npm install -g stylus-lookup`\n\n```sh\nstylus-lookup [options] <dependency>\n```\n\n| Option | Description |\n|---|---|\n| `-f, --filename <path>` | File containing the import/require |\n| `-d, --directory <path>` | Root location of all Stylus files |\n\nExample:\n\n```sh\nstylus-lookup --filename app/styles/styles.styl --directory app/styles variables\n# yields app/styles/variables.styl\n```\n\nRun `stylus-lookup --help` to see all the options.\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1683265842985,"_cnpm_publish_time":1683265842985,"dist-tags":{"latest":"7.0.0"}}