Add note about create command and fix outdated docs

This commit is contained in:
Dan Mindru 2019-04-24 22:01:05 +02:00
parent 2cee7381c6
commit df1c88c75a
1 changed files with 14 additions and 8 deletions

View File

@ -51,7 +51,8 @@ Writing HTML emails & email signatures sucks. Let's make it easier. We can't fix
### Installing ### Installing
```bash ```bash
$ npm install $ npm install
$ gulp # By default, HTML & CSS files in './src' will be watched for changes $ gulp # or npm run create
# By default, HTML & CSS files in './templates' will be watched for changes
``` ```
> Note: it's built using node v8.x, so please make sure your node.js version is up to date. Version 6+ should be fine. > Note: it's built using node v8.x, so please make sure your node.js version is up to date. Version 6+ should be fine.
@ -120,26 +121,31 @@ There are 2 examples of template structures, one for the `light` email template
Here's how the dark one looks: Here's how the dark one looks:
```bash ```bash
./src ./templates
├── dark ├── dark
├── conf.js # Template strings, logo, etc. ├── assets
├── dark.png # Image to embed as base64
├── conf.json # Template strings, logo, etc.
├── dark.css # Stylesheet. ├── dark.css # Stylesheet.
├── footer.inc.html # Contact info & logo ├── footer.inc.html # Contact info & logo
├── head.inc.html # 'Responsive' CSS goes here ├── head.inc.html # 'Responsive' CSS goes here
├── signature-reply.inc.html # Simplified signature (loads head)
├── signature.html # Full signature (loads head/footer) ├── signature.html # Full signature (loads head/footer)
├── signature-reply.html # Simplified signature (loads head)
``` ```
Here's how the light one looks: Here's how the light one looks:
```bash ```bash
./src ./templates
├── light ├── light
├── conf.js # Template strings, logo, etc. ├── assets
├── light.png # Image to embed as base64
├── conf.json # Template strings, logo, etc.
├── footer.inc.html # Contact info & logo ├── footer.inc.html # Contact info & logo
├── full-mail.html # Body + signature ├── full-mail.html # Body + signature
├── head.inc.html # 'Responsive' CSS goes here ├── head.inc.html # 'Responsive' CSS goes here
├── signature-reply.inc.html # Simplified signature (loads head) ├── light.css # Stylesheet.
├── signature.html # Full signature (loads head/footer) ├── signature.html # Full signature (loads head/footer)
├── signature-reply.html # Simplified signature (loads head)
``` ```
Files are included via [gulp-preprocess](https://www.npmjs.com/package/gulp-preprocess). Files are included via [gulp-preprocess](https://www.npmjs.com/package/gulp-preprocess).
@ -151,7 +157,7 @@ You are of course encouraged to change the default structure for your use case.
## Overview of the build process ## Overview of the build process
The diagram below shows what happens to your email templates. The diagram below shows what happens to your email templates.
Each folder in 'src' is considered a `template group`. A template file will be generated for each of the configuration objects you add have in the template group -> `conf.js`. Each folder in 'templates' is considered a `template group`. A template file will be generated for each of the configuration objects you add have in the template group -> `conf.js`.
![Responsive HTML email template/signatures diagram](https://user-images.githubusercontent.com/1515742/45000195-35268300-afc3-11e8-82b4-7507430c48a0.png) ![Responsive HTML email template/signatures diagram](https://user-images.githubusercontent.com/1515742/45000195-35268300-afc3-11e8-82b4-7507430c48a0.png)