Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: purgecss
node v9.11.2
version:
master
endpoint
share
tweet
const Purgecss = require('purgecss'); const fs = require('fs'); const css = '.a{color:#fff}.b{color:#000}.c{color:#123}'; fs.writeFileSync('a.css', css, err => console.log.bind(console)); const content = '<b class="a"></b>'; fs.writeFileSync('b.html', content, err => console.log.bind(console)); new Purgecss({ content: ['b.html'], css: ['a.css'] }).purge();
Created from: https://npm.runkit.com/purgecss#notebooks
Loading…
no comments
sign in
to comment