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: 9 months ago
JSON representation
Webpack plugin for converting MJML files to HTML
- Host: GitHub
- URL: https://github.com/onyourmarks-agency/tde-webpack-mjml-plugin
- Owner: onyourmarks-agency
- License: mit
- Archived: true
- Created: 2017-12-01T12:58:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T09:30:32.000Z (over 4 years ago)
- Last Synced: 2025-09-20T10:26:36.359Z (9 months ago)
- Topics: mjml, mjml-files, tde, webpack, webpack-plugin, webpack2, webpack3
- Language: JavaScript
- Size: 22.5 KB
- Stars: 12
- Watchers: 1
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
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)