gulp-html-rename
An HTML, CSS and JavaScript id and class minimiser.
This plugin only renames ids with a prefix of id-
and classes with a prefix of class-
.
You can specify more prefixes though the options object.
Polymer element names are included by default (iron-
, paper-
, ...)
Usage
First, install gulp-html-rename
as a development dependency:
npm install --save-dev gulp-html-rename
Then, add it to your gulpfile.js
:
Default Rename
const gulpHTMLRename = ; gulp;
Custom Replace
const gulpHTMLRename = ;const options = 'my-id-'; gulp;
Custom File extensions
html, css and js are included by default
const gulpHTMLRename = ; gulp;
API
gulp-html-rename can be called with options.
gulpHTMLRename(options, allowedExtensions)
options
Type: Array
The array with prefix strings.
allowedExtensions
Type: Array
The array with file extensions.