{"id":15021339,"url":"https://github.com/mitolog/dtcgen","last_synced_at":"2025-10-28T08:32:05.259Z","repository":{"id":42337365,"uuid":"195185846","full_name":"mitolog/dtcgen","owner":"mitolog","description":"a cli tool generating asset catalog for iOS project from figma.","archived":false,"fork":false,"pushed_at":"2023-03-03T03:46:30.000Z","size":15722,"stargazers_count":20,"open_issues_count":8,"forks_count":1,"subscribers_count":5,"default_branch":"dev","last_synced_at":"2024-10-05T08:12:41.232Z","etag":null,"topics":["codegenerator","figma","ios","swift","typescript","xcassets"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitolog.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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}},"created_at":"2019-07-04T06:55:06.000Z","updated_at":"2024-08-21T09:48:45.000Z","dependencies_parsed_at":"2024-09-24T00:02:25.057Z","dependency_job_id":"4fc2f957-9672-4974-a461-dcb2516b57ee","html_url":"https://github.com/mitolog/dtcgen","commit_stats":{"total_commits":194,"total_committers":2,"mean_commits":97.0,"dds":"0.020618556701030966","last_synced_commit":"de229621f6c901e5aa6ebe73fdc677f7bb30aff8"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitolog%2Fdtcgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitolog%2Fdtcgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitolog%2Fdtcgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitolog%2Fdtcgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitolog","download_url":"https://codeload.github.com/mitolog/dtcgen/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868622,"owners_count":16555670,"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":["codegenerator","figma","ios","swift","typescript","xcassets"],"created_at":"2024-09-24T19:56:28.022Z","updated_at":"2025-10-28T08:32:04.835Z","avatar_url":"https://github.com/mitolog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003edtcgen\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eGenerate xcassets from \u003ca href=\"https://www.figma.com\"\u003eFigma\u003c/a\u003e.\u003c/p\u003e\n\n![](https://raw.githubusercontent.com/wiki/mitolog/dtcgen/images/dtcgen_cover_small.png)\n\n## Requirements\n\n- node version \u003e= 14.15.4\n- Figma design file\n- Figma shared library ( for `dtcgen style` command )\n\n## Install\n\n```zsh\nyarn global add dtcgen\n# or\nnpm install -g dtcgen\n```\n\n## How to use\n\n1. create config files with `dtcgen init` , then fill out required parameters in `.env` file\n2. `dtcgen slice` to generate Image Set of xcassets\n3. `dtcgen style` to generate Color Set of xcassets\n\n\\*) If you installed locally, prepend `npx` before `dtcgen`.\n\n## Available parameters on `dtc.config.json`\n\n### slice\n\n| prop name      | type     | description                                                               |\n| -------------- | -------- | ------------------------------------------------------------------------- |\n| caseSensitive  | boolean  | set true if you want keyword to be case sensitive.                        |\n| keywords       | string[] | multiple keywords included in components' names that you want to extract. |\n| extension      | string   | the file extension to be extracted. currently supporting [pdf/svg/png].   |\n| sliceAllImages | boolean  | set true if you want to extract all images within a design file as png.   |\n| scales         | number[] | set scales you want to extract. but it's valid only on 'png' extension.   |\n\nnumbers that you can specify to scales are as below：\n\n|       | scales     |\n| ----- | ---------- |\n| figma | 1, 2, 3, 4 |\n\n#### more detail about `keywords` parameter\n\nAssuming you want to retrieve icons as xcassets-ready files, and icons have defined under `Icons / ***` already. Then, you need to add `icons` or `Icons` (if caseSensitive) to keywords within `dtc.config.json` . So you can retrieve all icons under that.\n\n\\*) Spaces in between will be eliminated on generating assets. Then **`/` is treated as a folder on generation.**\n\n### style\n\n| prop name       | type    | description                                                  |\n| --------------- | ------- | ------------------------------------------------------------ |\n| color.isEnabled | boolean | set true if you want to extract and generate color xcassets. |\n\n## Templates\n\nAll templates use `namespace` . You can modify templates as you like once you get your own templates folder created automatically after first command execution. You can specify your own template folder by `.env` file.\n\n### slice\n\n- [iconName.imageset](https://github.com/mitolog/dtcgen/blob/master/templates/ios/XcodeProjectTemplate/projectName/Assets.xcassets/intermediateDirectory/iconName.imageset)\n  - universal\n  - if `extension` is png, create multiple scaled images from 1x to 4x as specified by `scales` .\n  - if `extension` is svg or pdf, it will check `Preserve Vector Data` .\n\n\\*) If something wrong, deleting `OUTPUT_PATH/extracted` folder would fix the issue ( `OUTPUT_PATH` is defined in `.env` ).\n\n### style\n\n- [colorName.colorset](https://github.com/mitolog/dtcgen/tree/master/templates/ios/XcodeProjectTemplate/projectName/Assets.xcassets/intermediateDirectory/colorName.colorset)\n  - universal\n  - use srgb\n  - support Any appearance / Dark mode\n\n## Changelog\n\nhttps://github.com/mitolog/dtcgen/blob/master/Changelog.md\n\n## LICENSE\n\napache2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitolog%2Fdtcgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitolog%2Fdtcgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitolog%2Fdtcgen/lists"}