{"id":16062850,"url":"https://github.com/schpet/srcset-codegen","last_synced_at":"2026-02-08T16:31:10.524Z","repository":{"id":237761430,"uuid":"794218112","full_name":"schpet/srcset-codegen","owner":"schpet","description":"generate typescript files from a directory of images with width, height and srcset attributes","archived":false,"fork":false,"pushed_at":"2024-05-31T14:56:42.000Z","size":253,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-31T05:09:01.454Z","etag":null,"topics":["codegen","react","srcset","vite"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/srcset-codegen","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schpet.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-30T17:23:46.000Z","updated_at":"2025-02-04T17:29:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8e35c2d-3541-4c8b-b789-4078f6df1172","html_url":"https://github.com/schpet/srcset-codegen","commit_stats":null,"previous_names":["schpet/srcset-codegen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schpet/srcset-codegen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schpet%2Fsrcset-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schpet%2Fsrcset-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schpet%2Fsrcset-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schpet%2Fsrcset-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schpet","download_url":"https://codeload.github.com/schpet/srcset-codegen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schpet%2Fsrcset-codegen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29236898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["codegen","react","srcset","vite"],"created_at":"2024-10-09T05:00:28.545Z","updated_at":"2026-02-08T16:31:10.507Z","avatar_url":"https://github.com/schpet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SRCSET CODEGEN\n\ngenerates typescript for a images scaled at different [scale factors](https://developer.apple.com/design/human-interface-guidelines/images#Resolution) with filenames ending in @2x, @3x and so on.\n\n```diff\n .\n ├── sd\n+│   ├── smile.ts\n │   ├── smile.png\n │   ├── smile@2x.png\n │   └── smile@3x.png\n+├── single.ts\n+├── smile.ts\n+├── vector.ts\n ├── single.png\n ├── smile.png\n ├── smile@2x.png\n\n```\n\nexample of generated code:\n\n```ts\n// generated by srcset-codegen\nimport src from \"./smile.png\";\nimport src2x from \"./smile@2x.png\";\nimport src3x from \"./smile@3x.png\";\n\nconst width = 107;\nconst height = 107;\nconst srcSet = `${src2x} 2x, ${src3x} 3x`;\nexport default { src, width, height, srcSet };\n```\n\n## Usage\n\n```bash\nnpx srcset-codegen generate src/images\n\n# or, to watch for filesystem changes\nnpx srcset-codegen generate --watch src/images\n```\n\n## Notes\n\ninspired by [react-native images](https://reactnative.dev/docs/images).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschpet%2Fsrcset-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschpet%2Fsrcset-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschpet%2Fsrcset-codegen/lists"}