{"name":"stylus-lookup","version":"4.0.0","keywords":["stylus","lookup","dependency","partial"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"stylus-lookup@4.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","max-nested-callbacks":["error",5],"object-curly-spacing":["error","always"],"unicorn/prefer-module":"off","unicorn/prefer-type-error":"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":"2a279365276e9960ef7c0c4cd74dee0854993407","tarball":"http://registry-npm.ywwl.com/stylus-lookup/download/stylus-lookup-4.0.0.tgz","fileCount":5,"integrity":"sha512-PPpnzhqq1GAUJ8VohVbrTfCc/oO7aXRbDUMpH6RxCYR8yzVwdpvJdQdDaQs5bg9zHNfbm2y4Hjaxu+4BiMh3mQ==","signatures":[{"sig":"MEUCIQDQH84V4ko/JY9cmhHS4Hh/ZbWVUZ9iDxhW9G0l1ZAQvwIgR/OwTLTleRTbBasn02AEI6G+yZd3hnWleB+4yxUbsoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkRsUHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6Hg/9HVzMfVw/ZfnapXLSNnuqEPWUG476mFMsJf1jCTnotIOu+PX0\r\npjyxb2QeZhgG5uFu4hkLNDqfd8YxS0Ow+1v//xZ3RIflseBU+lt8jTW3aDaJ\r\n2d+D3mwdAqfe72BaK9pL3lP9YHNsUWmkH3xflRPSWmDxsHqKZmhk9ehDTrGA\r\n6LOn4beFNPr4cqdQ/xUmsA2aSccO5ygPae+3FF0b2TOVhfpZoWmWxo2nmw4a\r\nuSQY3oLB4fIGcDC5SjGkNiPYZl8rIPS24wK/7tcLAw56QxTSExfmBVFiXau2\r\n0Tk47bVB9g0oMrfODOq9zWwxkvnWPljMPR2uuOJZDkJdEzgsHD6kEySQWjOF\r\nLwqWYzXncUT0fzPK7GUAJk8vOig2nL9HE7M+Xe85UEuWObNyQagc+HsWFtE2\r\nG3LsILDztrc9PpSBtDXkBAEc++gOhBkDulCXQyoUFlpMaJoMEj7L5o0E4ZgW\r\nLzm/wDlcm0/mjdS6dPl2+tJr3gRsCTdvk2Pka+zBcqptNUCAxbr3sxEttWDS\r\nouDfZpsedd1knCGGWWRrcQ9CDJKcYMTOFouGzMdei8Qec4cPqaQZ5cjaNk6B\r\nEjq6vaMFgXCa0uAepLSdC9B9DyiWnZx9o22q2Aj5ZCvoZ/hSC76zraGajf4D\r\nv9DKXitT2icEiHOKGjUBjk01f+QbtagZLk8=\r\n=M+Gu\r\n-----END PGP SIGNATURE-----\r\n","size":3009,"noattachment":false,"key":"/stylus-lookup/-/stylus-lookup-4.0.0.tgz"},"main":"index.js","engines":{"node":">=12"},"gitHead":"089d86882af5dd9f4f54b771ecbbc6ab342a0fb5","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":"^9.5.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.13.0","xo":"^0.52.4","uvu":"^0.5.6","mock-fs":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/stylus-lookup_4.0.0_1682359559630_0.8495135468686406","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":1682359559788,"_cnpm_publish_time":1682359559788,"dist-tags":{"latest":"7.0.0"}}