1.0.2 • Published 2 years ago

emails-templates v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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