{"id":19560646,"url":"https://github.com/zoubin/postcss-deps","last_synced_at":"2025-11-19T22:03:16.204Z","repository":{"id":57327944,"uuid":"43117805","full_name":"zoubin/postcss-deps","owner":"zoubin","description":"Detect the css dependency graph","archived":false,"fork":false,"pushed_at":"2015-09-26T07:29:54.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T14:43:14.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zoubin.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}},"created_at":"2015-09-25T07:55:45.000Z","updated_at":"2015-09-26T07:29:00.000Z","dependencies_parsed_at":"2022-09-17T11:20:36.652Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/postcss-deps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zoubin/postcss-deps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fpostcss-deps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fpostcss-deps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fpostcss-deps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fpostcss-deps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/postcss-deps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fpostcss-deps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285335552,"owners_count":27154282,"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","status":"online","status_checked_at":"2025-11-19T02:00:05.673Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T05:08:22.711Z","updated_at":"2025-11-19T22:03:16.184Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","readme":"# postcss-deps\nDetect the css dependency graph.\n\nUse `@deps \"module\"` to indicate the dependency relationship.\n\n## Example\n\nInput:\n```\n⌘ tree example/fixtures\nexample/fixtures\n├── entry.css\n├── entry.expected.css\n├── node_modules\n│   ├── @style -\u003e ../style_modules\n│   └── reset\n│       └── index.css\n└── style_modules\n    ├── base\n    │   ├── base.css\n    │   └── package.json\n    ├── colors\n    │   └── index.css\n    └── deps\n        ├── deps.css\n        └── index.css\n```\n\nentry.css:\n\n```css\n@deps \"reset\";\n@deps \"@style/base\";\n@import \"@style/deps\";\na {\n  color: green;\n}\n\n```\n\ndeps.css:\n\n```css\n@deps \"../colors\";\na {\n  color: red;\n}\n\n```\n\nexample/deps.js:\n\n```javascript\nvar postcss = require('postcss');\nvar atImport = require('postcss-import');\nvar atDeps = require('..');\nvar path = require('path');\nvar fs = require('fs');\n\nvar fixtures = path.resolve.bind(path, __dirname, 'fixtures');\nvar src = fixtures('entry.css');\nvar contents = fs.readFileSync(src, 'utf8');\npostcss(\n  atImport(),\n  atDeps({\n    onDeps: function (deps) {\n      log('Deps Detected:', deps);\n    },\n  })\n)\n.process(contents, { from: src })\n.then(function (result) {\n  log('Original:', contents);\n  log('Compiled:', result.css);\n})\n.catch(function (err) {\n  console.log(err);\n});\n\nfunction log(str, c) {\n  console.log('\\n');\n  console.log(str);\n  console.log('-'.repeat(str.length));\n  console.log(c);\n}\n\n```\n\noutput:\n\n```\n⌘ node example/deps.js\n\n\nDeps Detected:\n--------------\n[ '/Users/zoubin/usr/src/zoubin/postcss-deps/test/fixtures/node_modules/reset/index.css',\n  '/Users/zoubin/usr/src/zoubin/postcss-deps/test/fixtures/style_modules/base/base.css',\n  '/Users/zoubin/usr/src/zoubin/postcss-deps/test/fixtures/style_modules/colors/index.css' ]\n\n\nOriginal:\n---------\n@deps \"reset\";\n@deps \"@style/base\";\n@import \"@style/deps\";\na {\n  color: green;\n}\n\n\n\n\nCompiled:\n---------\na {\n  color: red;\n}\na {\n  color: green;\n}\n\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fpostcss-deps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Fpostcss-deps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fpostcss-deps/lists"}