emails-templates

1.0.2 • Public • Published

Email templates

Usage

Each email template is grouped by projects, and they are located under src/pages folder.

Each project is deployed separately and has their own SendGrid accounts.

Please follow Foundation email template best practises. Read about Foundation email template here.

Template variables

When target environment is staging or production, Handlebars variables are not replaced.

If you want a variable to be always replaced, variable should have $ prefix.

<!-- `title` is not replaced for staging and production -->
<h1>{{title}}</h1>

<!-- `$title` is always replaced -->
<h1>{{$title}}</h1>

Create new template

In order to create a new template for staging and production use this command

yarn create-template

Build

Specify the target environment in command with --env argument. Default is local.

When environment is not local, templates are minified and CSS styles are inlined.

# Build for staging
yarn build --env staging

# Send email with production build
yarn email --env production

Readme

Keywords

none

Package Sidebar

Install

npm i emails-templates

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

3.31 MB

Total Files

506

Last publish

Collaborators

  • oleksandrstrelchenko