Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(email-templates): a library form mjml email templates #2243

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

bsahitya
Copy link
Collaborator

@bsahitya bsahitya commented Sep 12, 2024

Description

Includes a typescript library for email templates and a frontend app for email generation.

What's included?

The email-templates library exports:

  • An interface EmailTemplate
  • Methods:
    • getCssStyles: Function to get common CSS styles as a string
    • getEmailTemplates: Function to get a list of all the email templates
    • getMjmlStyles: Function to get common MJML styles as a string
    • getHtmlTemplate: Function to convert MJML to HTML

The email-generator app exposes an angular app which can be used to create email templates.

Test Steps

  • nx run email-templates:build
  • then check the dist folder for the final build
  • use the build files in any node/ts project.
  • Run nx run email-generator:serve
  • View the email generator app
  • Change templates from the side nav

General Tests for Every PR

  • npm run start still works.
  • npm run lint passes.
  • npm run stylelint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.
Screenshots or link to StackBlitz/Plunker
Screenshot 2024-09-12 at 1 40 09 PM
Email generator app

email-editor

Copy link
Collaborator

@owilliams320 owilliams320 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! 🔥 🔥 🚀 Thank you @bsahitya for this contribution 🤗

@@ -0,0 +1,9 @@
declare module '*.css?raw' {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this "?raw" since we are not using Vite for this app?

@owilliams320 owilliams320 merged commit ad32f51 into main Sep 18, 2024
6 checks passed
@owilliams320 owilliams320 deleted the feat/lib-email-templates branch September 18, 2024 17:44
@owilliams320
Copy link
Collaborator

🎉 This PR is included in version 8.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants