tde-webpack-mjml-plugin

2.0.2 • Public • Published

TDE Webpack MJML Plugin

Webpack plugin for converting MJML files to HTML

Install

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

Usage

In your webpack.config.js

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

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

API:

// 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

/tde-webpack-mjml-plugin/

    Package Sidebar

    Install

    npm i tde-webpack-mjml-plugin

    Weekly Downloads

    378

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    5.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • jordikroon
    • johnvanhulsen