{"name":"sass-lookup","version":"1.0.0","keywords":["sass","lookup","dependency","import","resolution"],"author":{"url":"http://www.mrjoelkemp.com/","name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"sass-lookup@1.0.0","maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"homepage":"https://github.com/mrjoelkemp/node-sass-lookup","bugs":{"url":"https://github.com/mrjoelkemp/node-sass-lookup/issues"},"dist":{"shasum":"9d6f76b7df03742775352ef9dc618bb0acaedadc","tarball":"http://registry-npm.ywwl.com/sass-lookup/download/sass-lookup-1.0.0.tgz","integrity":"sha512-LclNPeoPBkIKiylUJej4Xzm0nsNsFYcPcX/CfUzddPkVBTQVrdcWxQxhZNTO6oqnbwEEJEeyF08FmfqLxXiO9g==","signatures":[{"sig":"MEUCIQCSlG86vZIOknLi//A37v15oegzAaGSMbQCj8XVhXn11wIgXDQCKq2Yj2vBjmV9L0VR85XoAUMJ6wGCfFhIgu+aIEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2301,"noattachment":false,"key":"/sass-lookup/-/sass-lookup-1.0.0.tgz"},"main":"index.js","_from":".","_shasum":"9d6f76b7df03742775352ef9dc618bb0acaedadc","gitHead":"8b6a31ed592aa1874a88e2398aa1e4cb729aeed6","scripts":{"test":"jscs -p airbnb test index.js bin && mocha"},"_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"repository":{"url":"https://github.com/mrjoelkemp/node-sass-lookup.git","type":"git"},"_npmVersion":"2.7.1","description":"Get the file associated with a Sass import","directories":{"test":"test"},"_nodeVersion":"1.6.2","dependencies":{"is-relative-path":"~1.0.0"},"devDependencies":{"jscs":"~1.13.1","mocha":"~2.2.5","mock-fs":"~3.0.0"},"readme":"# sass-lookup\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-sass-lookup/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-sass-lookup/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/sass-lookup?logo=npm&logoColor=fff)](https://www.npmjs.com/package/sass-lookup)\n[![npm downloads](https://img.shields.io/npm/dm/sass-lookup)](https://www.npmjs.com/package/sass-lookup)\n\n> Get the file associated with a Sass import\n\nThis module replaces the Sass compiler's lookup algorithm for resolving a partial's path.\n\n* Handles underscored/non-underscored partials, partials with filenames, partials within subdirectories, partials with the `.scss` in the name, all of it.\n\n*Originally built for [Dependents](https://github.com/dependents/Dependents)*\n\n## Usage\n\n### ESM\n\n```js\nimport sassLookup from 'sass-lookup';\n\nsassLookup({\n  dependency: 'foo',\n  filename: 'path/to/filename',\n  directory: 'path/to/directory'\n})\n```\n\n### CommonJS\n\n```js\nconst { default: sassLookup } = require('sass-lookup');\n\nsassLookup({\n  dependency: 'foo',\n  filename: 'path/to/filename',\n  directory: 'path/to/directory'\n});\n```\n\n* `dependency`: The partial's name\n  * If your sass file had `@import \"foo\";`, then `\"foo\"` would be the dependency name\n* `filename`: The file importing the dependency\n* `directory`: The location(s) of all sass files\n  * A list of multiple directories is also supported for this argument.\n\nExample:\n\n```js\nimport sassLookup from 'sass-lookup';\n\nsassLookup({\n  dependency: 'variables',\n  filename: 'app/styles/styles.scss',\n  directory: 'app/styles'\n}); // yields app/styles/variables.scss\n```\n\n* This assumes that the file `app/styles/styles.scss` has `@import \"variables\";` and that all of the other sass files are located within `app/styles`.\n* Would yield `app/styles/_variables.scss` if the partial had an underscored filename.\n\n## CLI\n\nAssumes a global install of sass-lookup with `npm install -g sass-lookup`\n\n```sh\nsass-lookup [options] path/to/file\n```\n\nRun `sass-lookup --help` to see all the options.\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1435459599778,"_cnpm_publish_time":1435459599778,"dist-tags":{"latest":"7.0.0"}}