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

PN-13228 - Create template generator script #10

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

alessandrogelmi
Copy link
Collaborator

Short description

Develop a template generator script that converts MJML files into HTML and generates fully translated HTML templates from them.

List of changes proposed in this pull request

  • Import all assets from pn-email-templates
  • Implement a generator script with an MJML parser
  • Add tests

How to test

  1. Run npm run build
  2. Verify that the target folder contains a subfolder named generated-templates-assets, which should include all necessary assets (fonts, images, styles, templates)
  3. Open and review some of the generated templates to confirm correctness

Copy link

sonarcloud bot commented Nov 22, 2024

scripts/templates-builder/.nvmrc Outdated Show resolved Hide resolved
scripts/templates-builder/README.md Show resolved Hide resolved
scripts/templates-builder/package.json Outdated Show resolved Hide resolved
scripts/templates-builder/src/logger.js Outdated Show resolved Hide resolved
scripts/templates-builder/src/index.js Outdated Show resolved Hide resolved
templates-assets/templates/NotificationAAR_RADDalt/it.html Outdated Show resolved Hide resolved
scripts/templates-builder/README.md Outdated Show resolved Hide resolved
templates-assets/styles/style.css Show resolved Hide resolved
templates-assets/styles/index.css Outdated Show resolved Hide resolved
SarahDonvito
SarahDonvito previously approved these changes Nov 25, 2024
Copy link

@AndreaCimini90 AndreaCimini90 left a comment

Choose a reason for hiding this comment

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

In tests we don't manage the error case

templates-assets/styles/style.css Show resolved Hide resolved
scripts/templates-builder/package.json Outdated Show resolved Hide resolved
scripts/templates-builder/src/copyAssets.js Outdated Show resolved Hide resolved
scripts/templates-builder/src/buildMjml.js Outdated Show resolved Hide resolved
scripts/templates-builder/src/generateHtmlTemplates.js Outdated Show resolved Hide resolved
scripts/templates-builder/src/generateHtmlTemplates.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants