Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tristan0x/email-stooge

Email templates assembly line: inlines styles, minifies code, generates text equivalent
https://github.com/tristan0x/email-stooge

Last synced: about 5 hours ago
JSON representation

Email templates assembly line: inlines styles, minifies code, generates text equivalent

Awesome Lists containing this project

README

        

# Email Stooge

Given some HTML templates, email-stooge will create a set of files optimized for emailing.

New files have their styles inlined, are minified, and get a fulltext version.

## Instructions

### For command-line use

```shell
npm install -g email-stooge
```

```shell
email-stooge --help
```

### For programmatic use

```shell
npm install -g email-stooge
```

```javascript
var stooge = require('stooge');

stooge({
sourceDir: '/path/to/templates',
distDir: '/path/to/build',
filesPattern: '*.html',
}).prepare();
```

## Dependencies

The following tools are used to build the output:

* [juice](https://www.npmjs.com/package/juice)
* [html-minifier](https://www.npmjs.com/package/html-minifier)
* [html-to-text](https://www.npmjs.com/package/html-to-text)

## Notes

Since this tool was made with a very opinionated purpose, it does not allow – yet – as many options as the dependencies can offer.