{"id":20210118,"url":"https://github.com/iarthstar/presto-dom-code","last_synced_at":"2025-10-22T02:57:55.650Z","repository":{"id":153114048,"uuid":"173158496","full_name":"iarthstar/presto-dom-code","owner":"iarthstar","description":"Generates Presto-Dom code from Sketch Layers","archived":false,"fork":false,"pushed_at":"2019-03-04T08:13:34.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T02:57:50.876Z","etag":null,"topics":["design-to-code","generate-code","sketch-plugin","ui"],"latest_commit_sha":null,"homepage":null,"language":null,"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/iarthstar.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}},"created_at":"2019-02-28T17:40:47.000Z","updated_at":"2024-07-18T09:37:27.000Z","dependencies_parsed_at":"2024-07-17T04:05:17.578Z","dependency_job_id":null,"html_url":"https://github.com/iarthstar/presto-dom-code","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/iarthstar/presto-dom-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iarthstar%2Fpresto-dom-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iarthstar%2Fpresto-dom-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iarthstar%2Fpresto-dom-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iarthstar%2Fpresto-dom-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iarthstar","download_url":"https://codeload.github.com/iarthstar/presto-dom-code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iarthstar%2Fpresto-dom-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280370893,"owners_count":26319317,"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-10-22T02:00:06.515Z","response_time":63,"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":["design-to-code","generate-code","sketch-plugin","ui"],"created_at":"2024-11-14T05:46:29.038Z","updated_at":"2025-10-22T02:57:55.624Z","avatar_url":"https://github.com/iarthstar.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Presto-Dom-Gen\n\nA Sketch plugin that copies selected layers to the clipboard as code that can be pasted straight into a UI .purs file.\n\n- Copy one or more layers\n- Layers are copied in position\n- Text, group and rectangle layers are turned entirely in code\n- Image layers too are generated and exported @3x\n\n\n## Install\nDownload or clone the repository, and double click `Presto-Dom-Gen.sketchplugin`.\n\n\n## What layer types can the plugin handle?\n\n\n### Rectangles\nHere is an example of the code that will be generated when you select a rectangle showing the full set of properties that can be generated:\n```\nlinearLayout\n  [ height $ V 100 \n  , width $ V 200\n  , background \"#FF18294E\"\n  , stroke \"1,#FFFFFFFF\"\n  , cornerRadius 4\n  ][]\n```\n\n### Text\nText is copied as a native text layer:\n```\ntextView\n  [ height $ V 19 \n  , width $ V 235\n  , text \"There’s a lot to share with others…\"\n  , fontStyle \"Gilroy-Medium\"\n  , textSize 16\n  , color \"#9B9B9B\"\n  , letterSpacing (-0.33)\n  ]\n```\n\n### Groups\nGroups are copied as native linearLayout:\n```\nlinearLayout\n  [ height $ V 300\n  , width $ V 400\n  ][]\n```\n\n\n## What layer styles can the plugin handle?\n- Opacity\n- Background\n- Border\n- CornerRadius\n- FontStyle, FontSize, FontWeight\n- Height, Width\n- Gravity\n- ImageUrl\n- Text\n- Kerning\n\n\n## How include image assets\nWhen the design of a layer cannot be represented using native code you will need to use an image asset:  \n\n```\nimageView\n  [ height $ V 200 \n  , width $ V 200\n  , imageUrl \"avatar\"\n  ]\n```\n\n**Here’s how**:\n\n1. Select the layer in Sketch and press 'CMD SHIFT P'\n\n2. Enter the ImageUrl and press ok, it will be used to generate the asset naming and in generation imageView -\u003e imageUrl.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiarthstar%2Fpresto-dom-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiarthstar%2Fpresto-dom-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiarthstar%2Fpresto-dom-code/lists"}