Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 days 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T09:30:32.000Z (almost 3 years ago)
- Last Synced: 2024-12-14T11:34:39.415Z (about 1 month ago)
- Topics: mjml, mjml-files, tde, webpack, webpack-plugin, webpack2, webpack3
- Language: JavaScript
- Size: 22.5 KB
- Stars: 13
- Watchers: 2
- 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.jsmodule.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)