<commit_before># Modular Email Workflow

A simple modular email workflow that also supports MailChimp's template styling language by preserving styles in `<style></style>` tag and CSS comments, and automatically inlining styles for compatibility.

## Features

- [`gulp`](https://www.npmjs.com/package/gulp)
- [`gulp-sass`](https://www.npmjs.com/package/gulp-sass)
- Supports MailChimp template styling language
- Two basic responsive templates from [MailChimp Email Blueprints](https://github.com/mailchimp/Email-Blueprints) are included and modularised, add any of your own template if needed
- Simple modular templating using [`gulp-nunjucks-render`](https://www.npmjs.com/package/gulp-nunjucks-render)

## Getting started

1. `npm install` to install dependencies
2. Run `gulp` to start serving templates with style injection and auto reload using a [BrowserSync](http://www.browsersync.io/) server

## How it works

### Structure

Core template files are stored in `./core/source` (don't edit these). Core template files will be copied to `./source` for editing, the first time `gulp` or `gulp build` tasks are executed:

```
├── source
    └── style/         # Styles
        └── partials/  # Sass partials
    └── templates/     # Templates
        └── snippets/  # Snippets, modular sections to include into templates
```

### Snippets

Snippets can be included into templates using [nunjucks](http://mozilla.github.io/nunjucks/)' include syntax:<commit_msg>Add section for important gulp tasks.<commit_after># Modular Email Workflow

A simple modular email workflow that also supports MailChimp's template styling language by preserving styles in `<style></style>` tag and CSS comments, and automatically inlining styles for compatibility.

## Features

- [`gulp`](https://www.npmjs.com/package/gulp)
- [`gulp-sass`](https://www.npmjs.com/package/gulp-sass)
- Supports MailChimp template styling language
- Two basic responsive templates from [MailChimp Email Blueprints](https://github.com/mailchimp/Email-Blueprints) are included and modularised, add any of your own template if needed
- Simple modular templating using [`gulp-nunjucks-render`](https://www.npmjs.com/package/gulp-nunjucks-render)

## Getting started

1. `npm install` to install dependencies
2. Run `gulp` to start serving templates with style injection and auto reload using a [BrowserSync](http://www.browsersync.io/) server

## Gulp Tasks

##### `gulp`

Default task to start serving templates with style injection and auto reload using a [BrowserSync](http://www.browsersync.io/) server.

##### `gulp build`

Builds all `*.html` template files in `./source/templates` and placed into `./dist/templates` with styles preserved in header along with all comments and styles inlined into html elements.

## How it works

### Structure

Core template files are stored in `./core/source` (don't edit these). Core template files will be copied to `./source` for editing, the first time `gulp` or `gulp build` tasks are executed:

```
├── source
    └── style/         # Styles
        └── partials/  # Sass partials
    └── templates/     # Templates
        └── snippets/  # Snippets, modular sections to include into templates
```

### Snippets

Snippets can be included into templates using [nunjucks](http://mozilla.github.io/nunjucks/)' include syntax:
{'fraction_non_alphanumeric': 0.11257880516361453, 'fraction_numerical': 0.0012008405884118883, 'mean_word_length': 4.255520504731861, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 9, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '584859', 'n_tokens_mistral': 985, 'n_tokens_neox': 935, 'n_words': 361}