{"name":"sass-lookup","version":"7.0.0","description":"Get the file associated with a Sass import","type":"module","exports":{".":"./index.js"},"bin":{"sass-lookup":"bin/cli.js"},"scripts":{"lint":"xo","fix":"xo --fix","uvu":"uvu test -i fixtures","test":"npm run lint && npm run uvu","test:ci":"c8 npm run uvu"},"repository":{"type":"git","url":"git+https://github.com/dependents/node-sass-lookup.git"},"keywords":["sass","lookup","dependency","import","resolution"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","bugs":{"url":"https://github.com/dependents/node-sass-lookup/issues"},"homepage":"https://github.com/dependents/node-sass-lookup","engines":{"node":">=20.19.0 || >=22.12.0"},"dependencies":{"commander":"^14.0.3","enhanced-resolve":"^5.21.5"},"devDependencies":{"c8":"^11.0.0","mock-fs":"^5.5.0","uvu":"^0.5.6","xo":"^2.0.2"},"gitHead":"521350becb100e9756b958c8c7d6d140d20d82c1","_id":"sass-lookup@7.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-cNF7opCcHK982lkeXkg/No7N6X4ZwMTXhS3phl0orMSGV1XP5NYFUFGhIrBo+21Jml6RR0u8S9p96zd7hM7P4g==","shasum":"4aa0f48f7eab41db547f6fa400937cec62b18634","tarball":"http://registry-npm.ywwl.com/sass-lookup/download/sass-lookup-7.0.0.tgz","fileCount":5,"unpackedSize":8996,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAeuAnfod8u1rBTOz1f77XHnJrwVXTwG6zTbLIgikM/EAiA1G6qZOp678yRkk2HuMfmLtFy45XqqHNi1AbjXAlYWXw=="}],"size":3596,"noattachment":false,"key":"/sass-lookup/-/sass-lookup-7.0.0.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sass-lookup_7.0.0_1779194993892_0.6623751279247114"},"_hasShrinkwrap":false,"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":1779194994046,"_cnpm_publish_time":1779194994046,"dist-tags":{"latest":"7.0.0"}}