html-prettifydfdf-webpack-plugin

1.2.0 • Public • Published

html-prettify-webpack-plugin

Prettify output of HtmlWebpackPlugin

Installation

Install the plugin with npm:

$ npm i -D html-prettify-webpack-plugin

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlPrettifyPlugin = require('html-prettify-webpack-plugin');

plugins: [
    new HtmlWebpackPlugin()
    new HtmlPrettifyPlugin()
]

Configuration

You can pass a configuration options which is js-beautify's options. Default options for this package (but not for js-beautify):

{
  html: {
    indent_size: 2,
    end_with_newline: true,
    indent_inner_html: true,
    preserve_newlines: true,
    max_preserve_newlines: 0,
    wrap_line_length: 0,
    extra_liners: [],
    js: {
      end_with_newline: false,
      preserve_newlines: true,
      max_preserve_newlines: 2,
      space_after_anon_function: true
    },
    css: {
      end_with_newline: false,
      preserve_newlines: false,
      newline_between_rules: false
    }
  }
}

Package Sidebar

Install

npm i html-prettifydfdf-webpack-plugin

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

3.25 kB

Total Files

4

Last publish

Collaborators

  • zamanruhy