generator-xh-email

A Yeoman generator for scaffolding email templates

Usage no npm install needed!

<script type="module">
  import generatorXhEmail from 'https://cdn.skypack.dev/generator-xh-email';
</script>

README

XH Email Generator Build Status NPM version NPM dependiencies

XH Generator is a Yeoman generator for scaffolding email templates.

NPM

XH Email is suitable for client work when you deliver a completed project to your client for further review and development.

Getting Started

The following software needs to be installed if you want to use XH Email Generator. These installations need to be done just once so you can skip this section if you have the software already installed.

Node.js

Install Node.js so you can work with npm, Node package manager.

Premailer Gem

The Premailer gem is needed for XH Email Generator to run correctly.

gem install premailer

Grunt with Grunt CLI

Then install Grunt's command line interface (CLI) globally:

npm install -g grunt-cli

Yeoman

XH Email Generator is a Yeoman generator, so obviously it depends on it. You can easily install Yeoman with the following command:

npm install -g yo

XH Email Generator

To install generator-xh-email from npm, run:

npm install -g generator-xh-email

Congratulations, you are now ready to use XH Email Generator!

Usage

Finally, initiate the generator:

yo xh-email

Sensitive Information

During project generation process a file secrets.json will be created. In that file we store all of secret credentials needed for additional services used in XH Email Generator.

By default this file will be ignored from git repository. We encourage you not to store sensitive data in your git repo. If you must, please look into git-encrypt or some other method of encrypting your configuration secrets.

The secret file will look like this:

{
  "mailgun": {
    "api_key": "YOUR MG PRIVATE API KEY",
    "sender": "E.G. POSTMASTER@YOURDOMAIN.COM",
    "recipient": "WHO YOU WANT TO SEND THE EMAIL TO",
    "subject": "DEFAULT SUBJECT OF YOUR EMAILS"
  },
  "litmus": {
    "username": "LITMUS USERNAME",
    "password": "LITMUS PASS",
    "company": "LITMUS COMPANY/API SUBDOMAIN NAME"
  },
  "aws": {
    "accessKey": "AWS ACCESS KEY ID",
    "secretKey": "AWS SECRET KEY",
    "region": "S3 BUCKET REGION",
    "bucket": "S3 BUCKET NAME"
  }
}

Credits

XH Email Generator is inspired by XH Generator and Grunt Email Design Workflow.

License

XH Email Generator is licensed under MIT License.