Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-beautify-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-beautify-webpack-plugin

Adapter for beautifyjs as webpack plugin, chained with HtmlWebpackPlugin

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
237
increased by8.22%
Maintainers
1
Weekly downloads
 
Created
Source

html-beautify-webpack-plugin

Beautifier for output of HtmlWebpackPlugin

Installation

Install the plugin with npm:

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

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlBeautifyPlugin = require('html-beautify-webpack-plugin');

...
    plugins: [
        new HtmlWebpackPlugin()
        new HtmlBeautifyPlugin()
    ]
...
...
    plugins: [
        new HtmlWebpackPlugin()
        new HtmlBeautifyPlugin({
                config: {
                    html: {
                        end_with_newline: true,
                        indent_size: 2,
                        indent_with_tabs: true,
                        indent_inner_html: true,
                        preserve_newlines: true,
                        unformatted: ['p', 'i', 'b', 'span']
                    }
                },
                replace: [ ' type="text/javascript"' ]
            })
    ]
...
Order is important

Configuration

You can pass a configuration options. Allowed values are as follows:

  • config: {...} js-beautify's options as object to beatify the output.
  • replace: [string | { test: (string | RegExp), with?: (string | func)}] Optional array of items to replace in destination file

Keywords

FAQs

Package last updated on 19 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc