{"name":"@dependents/detective-less","version":"5.0.2","keywords":["detective","less","ast","dependencies"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"@dependents/detective-less@5.0.2","maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"contributors":[{"name":"Michael Orenstein","email":"michael@whiteshadows.me"}],"homepage":"https://github.com/dependents/node-detective-less","bugs":{"url":"https://github.com/dependents/node-detective-less/issues"},"xo":{"rules":{"curly":["error","multi-line"],"comma-dangle":["error","never"],"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/*"]},"dist":{"shasum":"60e96bd9597bc2604295cb476448aa4192fa0215","tarball":"http://registry-npm.ywwl.com/@dependents/detective-less/download/@dependents/detective-less-5.0.2.tgz","fileCount":4,"integrity":"sha512-QPKO4ao2+iniYAYnPZwHKK67EgDG2GAdye9OCy11xsmApHGwzpH3AcSdPjGyPO3tC2/K8mF7JjWX3A/FTRnskg==","signatures":[{"sig":"MEUCIFA/cge3byDDVXvnXLwoOylIXYTioPVl9pg/0r+Et5lCAiEAjagh2NKa4eSi/Yl/bV0BViNR6W5GwCFhAbbu+VED1rc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6242,"size":2749,"noattachment":false,"key":"/@dependents/detective-less/-/@dependents/detective-less-5.0.2.tgz"},"main":"index.js","engines":{"node":">=18"},"gitHead":"2c30fb5c779df67a37500a7ba485217f988a7369","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-detective-less.git","type":"git"},"_npmVersion":"11.12.1","description":"Find the dependencies of a less file","directories":{},"_nodeVersion":"24.15.0","dependencies":{"gonzales-pe":"^4.3.0","node-source-walk":"^7.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","xo":"^0.60.0","uvu":"^0.5.6"},"_npmOperationalInternal":{"tmp":"tmp/detective-less_5.0.2_1776661269266_0.6380072745235852","host":"s3://npm-registry-packages-npm-production"},"readme":"# @dependents/detective-less\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-detective-less/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-detective-less/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/@dependents/detective-less?logo=npm&logoColor=fff)](https://www.npmjs.com/package/@dependents/detective-less)\n[![npm downloads](https://img.shields.io/npm/dm/@dependents/detective-less)](https://www.npmjs.com/package/@dependents/detective-less)\n\n> Find the dependencies of a less file\n\n```sh\nnpm install @dependents/detective-less\n```\n\n**Note:** This is specific to the .less style syntax.\n\nIt's the LESS counterpart to [detective](https://github.com/substack/node-detective), [detective-amd](https://github.com/dependents/node-detective-amd), and [detective-es6](https://github.com/dependents/node-detective-es6).\n\n* The AST is generated using the [gonzales-pe](https://github.com/tonyganch/gonzales-pe) parser.\n\n## Usage\n\n### ESM\n\n```js\nimport fs from 'node:fs';\nimport detective from '@dependents/detective-less';\n\nconst content = fs.readFileSync('styles.less', 'utf8');\n\n// list of imported file names (ex: 'foo.less', 'foo', etc)\nconst dependencies = detective(content);\n\n// or to also detect any url() references to images, fonts, etc.\nconst allDependencies = detective(content, { url: true });\n```\n\n### CommonJS\n\n```js\nconst { default: detective } = require('@dependents/detective-less');\n```\n\n### Options\n\n* `url` (optional): (`Boolean`) also detect any `url()` references to images, fonts, etc.\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1776661269463,"_cnpm_publish_time":1776661269463,"dist-tags":{"latest":"6.0.1"}}