{"name":"detective-postcss","version":"7.0.1","description":"Detective to find dependents of CSS (PostCSS dialect)","main":"dist/index.js","typings":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/dependents/node-detective-postcss.git"},"bugs":{"url":"https://github.com/dependents/node-detective-postcss/issues"},"homepage":"https://github.com/dependents/node-detective-postcss#readme","keywords":[],"author":{"name":"Joscha Feth","email":"joscha@feth.com"},"license":"MIT","engines":{"node":"^14.0.0 || >=16.0.0"},"peerDependencies":{"postcss":"^8.4.47"},"dependencies":{"is-url":"^1.2.4","postcss-values-parser":"^6.0.2"},"devDependencies":{"@types/is-url":"^1.2.32","@types/jest":"^29.5.14","jest":"^29.7.0","lint-staged":"^15.4.3","postcss":"^8.5.1","prettier":"^3.4.2","rimraf":"^6.0.1","ts-jest":"^29.2.5","typescript":"^5.7.3"},"scripts":{"prepack":"rimraf ./dist && tsc --outDir dist --declaration --declarationDir dist","pretest":"prettier --check .","test":"jest --ci","test:watch":"jest --watch --notify","precommit":"lint-staged","prettier":"prettier --write ."},"runkitExampleFilename":"runkitExample.js","_id":"detective-postcss@7.0.1","gitHead":"f9dade6fecbc3a3c6f55f24521b47f046e79d312","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-bEOVpHU9picRZux5XnwGsmCN4+8oZo7vSW0O0/Enq/TO5R2pIAP2279NsszpJR7ocnQt4WXU0+nnh/0JuK4KHQ==","shasum":"f5822d8988339fb56851fcdb079d51fbcff114db","tarball":"http://registry-npm.ywwl.com/detective-postcss/download/detective-postcss-7.0.1.tgz","fileCount":6,"unpackedSize":8558,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCAjPLEuBT47fW1EHM3qV/3jhpw1KNR4V3GmZOspjCoIAIhAPKjxRLycogCmHAJDS50EcUSo+viNevho8ER+ZxU4fj8"}],"size":3385,"noattachment":false,"key":"/detective-postcss/-/detective-postcss-7.0.1.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/detective-postcss_7.0.1_1738415952498_0.9982219393899538"},"_hasShrinkwrap":false,"readme":"# node-detective-postcss\n\n[![build](https://img.shields.io/github/actions/workflow/status/dependents/node-detective-postcss/node.js.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-detective-postcss/actions/workflows/node.js.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/detective-postcss?logo=npm&logoColor=fff)](https://www.npmjs.com/package/detective-postcss) [![npm downloads](https://img.shields.io/npm/dm/detective-postcss)](https://www.npmjs.com/package/detective-postcss)\n\n> Find the dependencies of a CSS file (PostCSS dialect)\n\nSupports `@import` and [`@value ... from`](https://github.com/css-modules/postcss-icss-values).\n\n```sh\nnpm install postcss detective-postcss\n```\n\nIt's the CSS (PostCSS dialect) counterpart to [detective](https://github.com/browserify/detective), [detective-amd](https://github.com/dependents/node-detective-amd), [detective-es6](https://github.com/dependents/node-detective-es6), [detective-sass](https://github.com/dependents/node-detective-sass), [detective-scss](https://github.com/dependents/node-detective-scss).\n\n- The AST is generated using [postcss](https://github.com/postcss/postcss) and [postcss-values-parser](https://github.com/shellscape/postcss-values-parser).\n\n### Usage\n\n```js\nconst fs = require('fs');\nconst detective = require('detective-postcss');\n\nconst content = fs.readFileSync('styles.css', 'utf8');\n\n// list of imported file names (ex: 'bla.css', 'foo.css', 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### License\n\n[MIT](LICENSE)\n\n## Releasing\n\n- Bump the version of `package.json` to a meaningful version for the changes since the last release (we follow semver).\n- To do a dry-run of the release and what would go out in the package you can manually execute the [npm-publish](https://github.com/dependents/node-detective-postcss/actions/workflows/npm-publish.yml) workflow on the `main` branch. It will do a dry-run publish (not actually publish the new version).\n- Draft a new release in the github project - please use a tag named `vX.X.X` (where `X.X.X` is the new to-be-releases semver of the package - please add as many detail as possible to the release description.\n- Once you're ready, `Publish` the release. Publishing will trigger the [npm-publish](https://github.com/dependents/node-detective-postcss/actions/workflows/npm-publish.yml) workflow on the tag and do the actual publish to npm.\n","publish_time":1738415952669,"maintainers":[{"name":"joscha","email":"joscha@feth.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"_cnpm_publish_time":1738415952669,"dist-tags":{"latest":"9.0.1"}}