1.4.7 • Published 8 years ago

handlebars-email-template v1.4.7

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

Handlebars Email Template

Build Status

Using handlebars to create your email templates with ease.

Setup

npm install handlebars-email-template

Folder Structure

- data
  data.json
- views
	- partials
		table-row.hbs
	email.hbs
- index.js

Email Template HTML

You can use the HTML Snippets - Email Template as a starting point for your template.

Usage

var handlebarsEmailTemplate = require('handlebars-email-template');

var options = {
	root: 'views', // This is the root of your templates folder
	src: '_partials', // Partials folder
	dest: 'compiled', // Destination directory
	srcTemplate: 'email', // Src Template
	destTemplate: 'email', // Destination Template Name
	ext: 'hbs',
	data: 'data/data.json' // Path to data file
};

handlebarsEmailTemplate(options);

// Expected output

//- compiled
//	- email.html

Options

  • root - This is the root of your templates directory
  • src - Partials directory
  • dest - Output directory
  • srcTemplate - Name of the template eg: email.hbs
  • destTemplate - Name of output file.
  • data - path to data.
1.4.7

8 years ago

1.3.7

8 years ago

1.3.6

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.1.1

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago