Package Exports
- @ecomplus/transactional-mails
- @ecomplus/transactional-mails/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ecomplus/transactional-mails) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
- Clone the repository:
git clone git@github.com:ecomclub/transactional-mails.git
- Move to folder and install dependencies:
cd transactional-mails
npm i
- Run dev server on http://localhost:3000/:
npm run serve
Add or edit templates on folders
views
/scss
and dictionary oni18n
folder;New templates must also be added to
src/index
as exported lib method;Update jsdoc generated documentation:
npm run doc
Commit changes following Conventional Commits;
Release and publish:
npm run release
git push --follow-tags origin master && npm publish