{"name":"sass-lookup","version":"4.0.0","keywords":["sass","lookup","dependency","import","resolution"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"sass-lookup@4.0.0","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","max-nested-callbacks":["error",5],"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/*"],"overrides":[{"envs":["mocha"],"files":"test/**"}]},"bin":{"sass-lookup":"bin/cli.js"},"dist":{"shasum":"558e670a9a479685eec36728c24f35427d07a888","tarball":"http://registry-npm.ywwl.com/sass-lookup/download/sass-lookup-4.0.0.tgz","fileCount":5,"integrity":"sha512-qDb+H8oDt4W+DUUfM7o2Hk9X1E9i3cM0o9mCIJxWxtDn8H98459LHe6WgiUnxz7sNOZjfkVuzy6bcwju7lFBrw==","signatures":[{"sig":"MEQCIB8og64jeePJQmRVFtphzYJjt5oWOXX+PjLiDTVvGc/gAiAhWjBK6+hGOq4a1RKnSzi11oj0db3vX6aVMCTi22OICg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkREZbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0nA//TlYX9T8wG2vqRzAQKRGHFG21gSgtI62IAKpFwUM+oPUU650n\r\nRkxUn5xe6nJOT7LeZIHgpxBbeLOal+6xVn0gfULZGAIeFrtK6sPh3rxFozIG\r\nc1vkOMXcSBdHUIR0jo8+qTVItlOCBaa4s8QxuApf0w9O/jxYAXUTpn5ER40l\r\n/syySQSoibJuc0JWgaQpJV1iCK3b+TH5GET2lWJQFjHoCobxLKjFigECKOFM\r\n1om6huo2jMoJo/gmep9+AHV4AzleNT+WhE6yTlYr+I+zWwmYdm031utmG3SL\r\nOxJSk4zbug8ARbVZqKpTUPN/DECdJKwMMupNW5nbv2yVw3gw/ALGD+PGsKEI\r\nvgYNNgPSlAQYRBnHDQzBmU2ZDwDHOcZs9N1W73YCMJY/YlbDcgk3CckrD781\r\n1qxjK8iV9FiiEPFq9ymsfnKseTX9d7U+Y9Zym4ATW/UglRXSvLWMZ1EHGCFP\r\nEHepzmYjnese3JSV9c1LS3rVwZRC6y9naXqts80qLChUcwUjXAZVbnt6IyOn\r\nxaf25qFnjVAO1Zlv/8TUnrT83rXjc0iQMvyfSKFDjn3YsdpwgGj5pdjOgaFN\r\nBkZZajD1TIseU2+pTouD/v4PgX1ZAyDEIinE72hG4WWE9jhW+0tjC50Oy9BZ\r\nZmiB027XryrQZbg22dNT8z3cyvRZm0/zwGg=\r\n=WsJH\r\n-----END PGP SIGNATURE-----\r\n","size":3170,"noattachment":false,"key":"/sass-lookup/-/sass-lookup-4.0.0.tgz"},"main":"index.js","engines":{"node":">=12"},"gitHead":"1e4a0a38addb7fbf90839c50f26bbdd10321a445","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":"^9.5.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.13.0","xo":"^0.52.4","uvu":"^0.5.6","mock-fs":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sass-lookup_4.0.0_1682196059171_0.6530616565459901","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":1682196059334,"_cnpm_publish_time":1682196059334,"dist-tags":{"latest":"7.0.0"}}