This package has been deprecated

Author message:

no longer maintained

@jarrodldavis/purgecss-from-html

1.1.0 • Public • Published

Purgecss-from-html

Build Status CircleCi dependencies Status devDependencies Status Codacy Badge npm license

Get the selectors of an html file.

Install

npm i -D purgecss-from-html

Usage

Use with Purgecss

import Purgecss from "purgecss"
import purgeHtml from "purgecss-from-html"
const purgeCss = new Purgecss({
    content: ["**/*.html"],
    css: ["**/*.css"],
    extractors: [
        {
            extractor: purgeHtml,
            extensions: ["html"]
        }
    ]
})
const result = purgecss.purge()

Use alone

import purgeHtml from "purgecss-from-html"
import fs from "fs"

const htmlContent = fs.readFileSync("index.html")
const htmlSelectors = purgeHtml.extract(htmlContent)

Package Sidebar

Install

npm i @jarrodldavis/purgecss-from-html

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

13.2 kB

Total Files

10

Last publish

Collaborators

  • jarrodldavis