purgecss-whitelist-htmltags

1.0.7 • Public • Published

Purgecss HTML Tags Whitelist

purgecss whitelist for all available HTML Tags.

Getting started

First install purgecss.

Installation

npm i --save-dev purgecss-whitelist-htmltags

Usage

import Purgecss from 'purgecss';
import purgecssWithHtml from 'purgecss-whitelist-htmltags';

const purgeCss = new Purgecss({
	whitelist: purgecssWithHtml.whitelist,
	whitelistPatterns: purgecssWithHtml.whitelistPatterns
});

const res = purgeCss.purge();

if you have additional classes for whitelist or whitelistPattners, you can use the spread operator:

whitelist: [
	...purgecssWithHtml.whitelist,
	...thirdparty.whitelist,
	'my-class'
],
whitelistPatterns: [
	...purgecssWithHtml.whitelistPatterns,
	...thirdparty.whitelistPatterns,
	/^my-(class|id)$/
]

Readme

Keywords

Package Sidebar

Install

npm i purgecss-whitelist-htmltags

Weekly Downloads

11

Version

1.0.7

License

GPL-2.0-or-later

Unpacked Size

39.6 kB

Total Files

4

Last publish

Collaborators

  • bfiessinger