Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/onyourmarks-agency/tde-webpack-mjml-plugin

Webpack plugin for converting MJML files to HTML
https://github.com/onyourmarks-agency/tde-webpack-mjml-plugin

mjml mjml-files tde webpack webpack-plugin webpack2 webpack3

Last synced: 6 days ago
JSON representation

Webpack plugin for converting MJML files to HTML

Awesome Lists containing this project

README

        

# TDE Webpack MJML Plugin

Webpack plugin for converting MJML files to HTML

## Install

```bash
npm install --save-dev tde-webpack-mjml-plugin
```

## Usage

In your `webpack.config.js`

```javascript
var MjmlPlugin = require('tde-webpack-mjml-plugin');

module.exports = {
// ...
plugins: [
new MjmlPlugin(paths.MJML, {
extension: '.twig',
outputPath: 'path/to/mjml'
}),
]
};
```

## API:

```js
// webpack.config.js

module.exports = {
plugins: [
new MjmlPlugin(inputPath, {
extension: options.extension,
outputPath: options.outputPath
}),
]
}
```

### `inputPath`

Type: `String`

The path where MJML files are located

### `options.extension`

Type: `String`

Default: `".html"`

The default output extension

### `options.outputPath`

Type: `String`

Default: `""`

The path where HTML files should be written to

## License

MIT © [TDE](https://github.com/tdeNL)