Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

metalsmith-purifycss

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-purifycss

PurifyCSS plugin for Metalsmith static site generator

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Metalsmith PurifyCSS

Build Status

This is a Metalsmith plugin for PurifyCSS.


Installation

To install run:

npm install metalsmith-purifycss --save-dev

or if you're using Yarn

yarn add metalsmith-purifycss --dev

Usage

The API interface is mostly the same as PurifyCSS.

Additional options:

KeyTypeDescription
removeOriginalbooleanRemoves files matched by the css option from the output.

This is the simplest setup:

const purifyCSS = require('metalsmith-purifycss');

Metalsmith()
  // ... Compile CSS/HTML/JavaScript
  .use(purifyCSS({
    content: ['*.html', '*.js'],
    css: ['styles.css'],
    output: 'styles-purified.css',
  }))
  .build((err, files) => {
    if (err) throw new err;
  });
});

Note that if you'd like to overwrite the original CSS file, set the output name to match the css filename.

FAQs

Package last updated on 30 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc