{"id":22934643,"url":"https://github.com/frani/email-designer","last_synced_at":"2025-04-01T18:46:51.441Z","repository":{"id":189555876,"uuid":"680885673","full_name":"frani/email-designer","owner":"frani","description":"💌 ✍️ Zero-Dependencies Tool to create HTML emails in a modular and simple way","archived":false,"fork":false,"pushed_at":"2023-08-23T03:48:28.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T18:50:31.146Z","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/frani.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":"2023-08-20T18:12:49.000Z","updated_at":"2023-08-20T18:32:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"41223011-d1ed-47a8-9386-50491bc566f8","html_url":"https://github.com/frani/email-designer","commit_stats":null,"previous_names":["frani/email-designer"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frani%2Femail-designer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frani%2Femail-designer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frani%2Femail-designer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frani%2Femail-designer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frani","download_url":"https://codeload.github.com/frani/email-designer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246693724,"owners_count":20818942,"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":[],"created_at":"2024-12-14T11:44:33.116Z","updated_at":"2025-04-01T18:46:51.425Z","avatar_url":"https://github.com/frani.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\n  \u003cbr\u003e\n  \u003cspam style=\"font-size: 3em\"\u003e💌\u003c/spam\u003e\n  \u003cbr\u003e\n\tEmail \u003ci\u003eDesigner\u003c/i\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\u003ci\u003eZero-Dependencies Tool to create HTML emails in a modular and simple way\u003c/i\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n# Install\n\nif you are using Yarn:\n\n```sh\nyarn add email-designer\n```\n\nif you are using NPM:\n\n```sh\nnpm i email-designer\n```\n\n# Usage\n\nThis module comes to provide a solution to the problem of non-dynamism or dependence on developers when designing new email templates.\n\nusing email-designer can find dynamism and ease for the developer to send new emails with easy and simple structures to adjust when programming.\n\n\u003e 🍋 easy peasy lemon squeezy\n\nThis service will be a module in which we can pass a JSON that describes the structure we want for our new email, as well as the data in between. In response, we will receive an HTML of our email.\n\n## Ejemplo:\n\n```jsx\n// let import email designer\nconst emailDesigner = require('email-desginer')\n\n/**\n * la estructura es simplemente una lista de bloques/componente\n * y cada bloque/componente es descripto con un JSON.\n *\n * El email-HTML se genera siguiendo el orden del array\n */\nconst blocks = [\n\t{\n\t\tname: \"base/logo\",\n\t\tparams: {\n\t\t\turl: 'https://image.com/logo.png',\n\t\t\tmaxHeight: '80px'\n\t\t}\n\t},\n\t{\n\t\tname: \"base/title\",\n\t\tparams: {\n\t\t\ttitle: 'Buenos Dias',\n\t\t\tsubtitle: 'Argentina'\n\t\t}\n\t},\n\t{\n\t\tname: 'juanson/otp-code' // al ser un proyecto open-source, otros usuarios pueden aportar de sus diseños al proyecto\n\t\tparams: {\n\t\t\tcode: '123 456'\n\t\t}\n\t},\n\t{\n\t\tname: 'base/footer',\n\t\tparams: {\n\t\t\ttitle: 'adios',\n\t\t\ttext: 'gracias por leer este email'\n\t\t}\n\t},\n\t{\n\t\tname: 'base/social media',\n\t\tparams: {\n\t\t\ttwitter: '@franidev',\n\t\t\tdiscord: '@frani'\n\t\t}\n\t}\n]\n\nconst HTML = emailDesginer.createHTML({ blocks })\nawait sendEmail(HTML)\n\n// OR change email options\n\nconst options = {\n\tbackgroundColor: '#dddddd'\n}\n\nconst emailHTML = emailDesginer.createHTML({ blocks, options })\nawait sendEmail(emailHTML)\n```\n\n---\n\n# PR with your Block !\n\nUse block sample in `/blocks/sample` to start to create your block\n\nEveryone can create their own block and add it to mail-designer repo!\n\nYou can add your block or design as you like. Simply add a folder with the name you prefer and within it, your components.\n\n# Wabout Templates ?\n\npos claro! miralos como una funcion que create un HTML con una seria de blocks y data ya predefinida y solo hay que cambiar info!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrani%2Femail-designer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrani%2Femail-designer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrani%2Femail-designer/lists"}