{"name":"sass-lookup","version":"5.0.1","keywords":["sass","lookup","dependency","import","resolution"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"sass-lookup@5.0.1","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-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"},"space":true,"ignores":["test/fixtures/*"]},"bin":{"sass-lookup":"bin/cli.js"},"dist":{"shasum":"1f01d7ff21e09d8c9dcf8d05b3fca28f2f96e6ed","tarball":"http://registry-npm.ywwl.com/sass-lookup/download/sass-lookup-5.0.1.tgz","fileCount":5,"integrity":"sha512-t0X5PaizPc2H4+rCwszAqHZRtr4bugo4pgiCvrBFvIX0XFxnr29g77LJcpyj9A0DcKf7gXMLcgvRjsonYI6x4g==","signatures":[{"sig":"MEYCIQCzJ0uk7Hf2ElQy06MvPZ9WJLmsqJ+RB3rw35Np7vyvCQIhAIDOxOO0Vwyp0X2l1tk3rzKj+gl5Koon7eDFVli/mGw1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7793,"size":3255,"noattachment":false,"key":"/sass-lookup/-/sass-lookup-5.0.1.tgz"},"main":"index.js","engines":{"node":">=14"},"gitHead":"449f1d1e0df95d3fd3a16de948517576199e58ef","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":"9.5.1","description":"Get the file associated with a Sass import","directories":{},"_nodeVersion":"18.16.0","dependencies":{"commander":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.13.0","xo":"^0.54.2","uvu":"^0.5.6","mock-fs":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sass-lookup_5.0.1_1683958887503_0.8919441391086338","host":"s3://npm-registry-packages"},"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":1683958887656,"_cnpm_publish_time":1683958887656,"dist-tags":{"latest":"7.0.0"}}