{"name":"sass-lookup","version":"6.1.2","keywords":["sass","lookup","dependency","import","resolution"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"sass-lookup@6.1.2","maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"homepage":"https://github.com/dependents/node-sass-lookup","bugs":{"url":"https://github.com/dependents/node-sass-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","unicorn/no-anonymous-default-export":"off"},"space":true,"ignores":["test/fixtures/*"]},"bin":{"sass-lookup":"bin/cli.js"},"dist":{"shasum":"eefcc90ebeae451d252a4a9d8d090fef1a62a279","tarball":"http://registry-npm.ywwl.com/sass-lookup/download/sass-lookup-6.1.2.tgz","fileCount":5,"integrity":"sha512-GjmndmKQBtlPil79RK72L7yc5kDXZPCQeH97bP8R8DcxtXQJO6vECExb3WP/m6+cxaV9h4ZxrSRvCkPG2v/VSw==","signatures":[{"sig":"MEYCIQDsX4snmVI7wx2ttSPIDseSIy3apsgEIINs+DBaG9XPxAIhAOn6/NoIygs7ulyJty1vDN6nxIawrMsGggzElGheDxtT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9312,"size":3671,"noattachment":false,"key":"/sass-lookup/-/sass-lookup-6.1.2.tgz"},"main":"index.js","engines":{"node":">=18"},"gitHead":"2f2c462bae900a580f53e98df1d96620e4da77d1","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-sass-lookup.git","type":"git"},"_npmVersion":"11.12.1","description":"Get the file associated with a Sass import","directories":{},"_nodeVersion":"24.15.0","dependencies":{"commander":"^12.1.0","enhanced-resolve":"^5.20.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","xo":"^0.60.0","uvu":"^0.5.6","mock-fs":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sass-lookup_6.1.2_1777135803697_0.37880097759016307","host":"s3://npm-registry-packages-npm-production"},"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":1777135803863,"_cnpm_publish_time":1777135803863,"dist-tags":{"latest":"7.0.0"}}