Skip to content

ecomplus/transactional-mails

Folders and files

NameName
Last commit message
Last commit date
Oct 2, 2019
Dec 10, 2019
Dec 10, 2019
Oct 18, 2019
Oct 18, 2019
Dec 11, 2019
Jul 8, 2019
Jul 8, 2019
Oct 2, 2019
Jan 18, 2019
Jul 8, 2019
Jul 8, 2019
Oct 2, 2019
Oct 2, 2019

Repository files navigation

transactional-mails

Default transactional email templates for E-Com Plus stores

Usage

The @ecomplus/transactional-mails package provides a list of methods to render email templates with received data.

Each method render a specific template, all of them returns a promise that pass HTML markup on success.

const transactionalMails = require('@ecomplus/transactional-mails')

transactionalMails.templateName(data, lang, themeColor)
  .then(html => {
    // HTML is a string
    console.log(html)
  })
  .catch(err => console.error(err))

Developing

  1. Clone the repository:
git clone git@github.com:ecomclub/transactional-mails.git
  1. Move to folder and install dependencies:
cd transactional-mails
npm i
  1. Run dev server on http://localhost:3000/:
npm run serve
  1. Add or edit templates on folders views / scss and dictionary on i18n folder;

  2. New templates must also be added to src/index as exported lib method;

  3. Update jsdoc generated documentation:

npm run doc
  1. Commit changes following Conventional Commits;

  2. Release and publish:

npm run release
git push --follow-tags origin master && npm publish