{"id":19123429,"url":"https://github.com/dependents/node-detective-postcss","last_synced_at":"2025-06-12T08:07:08.391Z","repository":{"id":37070977,"uuid":"129252886","full_name":"dependents/node-detective-postcss","owner":"dependents","description":"Find the dependencies of a CSS file (PostCSS dialect)","archived":false,"fork":false,"pushed_at":"2025-05-01T07:33:03.000Z","size":1229,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T21:27:26.895Z","etag":null,"topics":["ast","css","dependencies","dependency-graph","detective","nodejs","parser","postcss"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dependents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-12T13:07:48.000Z","updated_at":"2025-05-01T07:33:05.000Z","dependencies_parsed_at":"2025-01-01T11:06:32.823Z","dependency_job_id":"55afad86-ee50-462a-96b0-7e5fff710a55","html_url":"https://github.com/dependents/node-detective-postcss","commit_stats":{"total_commits":146,"total_committers":6,"mean_commits":"24.333333333333332","dds":0.726027397260274,"last_synced_commit":"fe15617110b9e18526ed582b54634cf73f69fb13"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-detective-postcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-detective-postcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-detective-postcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-detective-postcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dependents","download_url":"https://codeload.github.com/dependents/node-detective-postcss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-detective-postcss/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258874952,"owners_count":22771239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","css","dependencies","dependency-graph","detective","nodejs","parser","postcss"],"created_at":"2024-11-09T05:25:37.924Z","updated_at":"2025-06-12T08:07:08.365Z","avatar_url":"https://github.com/dependents.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-detective-postcss\n\n[![build](https://img.shields.io/github/actions/workflow/status/dependents/node-detective-postcss/node.js.yml?branch=main\u0026label=CI\u0026logo=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\u0026logoColor=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\u003e 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdependents%2Fnode-detective-postcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdependents%2Fnode-detective-postcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdependents%2Fnode-detective-postcss/lists"}