0.0.1 • Published 8 years ago

pc__search_id_in_html v0.0.1

Weekly downloads
6
License
-
Repository
github
Last release
8 years ago

Search id in HTML

This is plugin for nmp-package "Post-Compression".
He's searching for the value of "id" in the HTML code.

An example of using:

var searchIdInHTML = require("pc__search_id_in_html"),
    uniqueNames = {};
 
gulp.src("./*.html")
    .pipe(postCompression.search([
        searchIdInHTML()
    ], uniqueNames));

Where:

  • uniqueNames - an object of type JSON with rules replace the long words to short words.

An example of HTML code:

<p id="someIdA"></p>
<p id="someIdB"></p>

An example of a result searching:

{
    "someIdA": 1,
    "someIdB": 1
}