{"name":"stylus-lookup","version":"3.0.2","keywords":["stylus","lookup","dependency","partial"],"author":{"url":"http://www.mrjoelkemp.com/","name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"stylus-lookup@3.0.2","maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"homepage":"https://github.com/mrjoelkemp/node-stylus-lookup","bugs":{"url":"https://github.com/mrjoelkemp/node-stylus-lookup/issues"},"bin":{"stylus-lookup":"bin/cli.js"},"dist":{"shasum":"c9eca3ff799691020f30b382260a67355fefdddd","tarball":"http://registry-npm.ywwl.com/stylus-lookup/download/stylus-lookup-3.0.2.tgz","fileCount":6,"integrity":"sha512-oEQGHSjg/AMaWlKe7gqsnYzan8DLcGIHe0dUaFkucZZ14z4zjENRlQMCHT4FNsiWnJf17YN9OvrCfCoi7VvOyg==","signatures":[{"sig":"MEYCIQCakjJCDgblswnH36Ixs8dR9K9DWXSY3X9kcNp8YDfHvAIhAOXZwbTqWh2+mRqMDuy8PmJQ+8AXsXTeeZ7eQ81PnwKb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEHYzCRA9TVsSAnZWagAACOkP+QE/eFnsye5omLtWQdAd\nlFE3UcxEEb3CtcIpzZ8/wk8Tc6hJklu4VFpykmsiI8k+59qvyq2tPisC36S+\nPgQ9dZ1FM1BqO4LKX3lhEbB/qZCg0L9lqFS1aPwQ0JI9KFA26haqGtSHk7DK\nKax0cGROatYLDCbfBE0bvbFRFwhjmZ6qqx0WziNnGc3uwKymeEXf44p2+1hb\neYc8nBoNaQy+AAEQitYons95pN5c00EUABsVOUirQqsUPfAQ8hexU9m8zUlS\niPIlTZg9mUuPTb8COgQkmU/5ap5u3m/lGfMfMDyXOnjuJOjO7WWnxpD6wl49\nk5sHhofRQI+9xDnq18NxHHGfuGQ3a56oncT8cJKk9DOqhKoLwb5wpWVpsFDm\nEALHxghLMORhUROvcNbfo64kDUx9509bQ2kCCsm1qxmt1NtHmldksvkwyNCw\ndIJxsxJ9PIznPoa8V7WPTBUgjNfGmFb5m7oQRqYClQESzH1rRI7fUXqs1t/T\nUqgZRfUJPva6wxt5kyW69YBS+opPpM/hIChYH2Qtd4Q3u38n3aTtT2RwQ0kD\njFlzAQu2nQmv2YddGJzVlRET36eGkJ3NQNVMi6s3NN1TYkYjVLBo62F2+Luo\nIOFEVBWD5a5alGoCXxhhbn4Kt+h9kWYo+hyI/bafcYfZzyCe+C4a/vcx12Sm\noHQD\r\n=wVzl\r\n-----END PGP SIGNATURE-----\r\n","size":2496,"noattachment":false,"key":"/stylus-lookup/-/stylus-lookup-3.0.2.tgz"},"main":"index.js","engines":{"node":">=6.0.0"},"gitHead":"ff5849b98e58b5d0fc927f88bef5a59e2ba5073f","scripts":{"test":"jscs -p google test index.js bin && mocha"},"_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"repository":{"url":"git+https://github.com/mrjoelkemp/node-stylus-lookup.git","type":"git"},"_npmVersion":"6.4.1","description":"Get the file associated with an imported/required Stylus partial","directories":{"test":"test"},"_nodeVersion":"8.12.0","dependencies":{"debug":"^4.1.0","commander":"^2.8.1"},"_hasShrinkwrap":false,"devDependencies":{"jscs":"^3.0.7","mocha":"^5.2.0","mock-fs":"^4.4.2"},"_npmOperationalInternal":{"tmp":"tmp/stylus-lookup_3.0.2_1544582707118_0.9809307418659909","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":1544582707343,"_cnpm_publish_time":1544582707343,"dist-tags":{"latest":"7.0.0"}}