Socket
Socket
Sign inDemoInstall

broccoli-colorguard

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

broccoli-colorguard

Broccoli wrapped css-colorguard.


Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Broccoli wrapped Colorguard - Keep a watchful eye on your css colors

Warning

As of the first iteration of this plugin, colorguard is run once per file, not as a sum total of all files. This is wrong, but it's a start. The best way to use this is after a concatenation step (or precompilation step that includes concatenation) in broccoli.

Install

$ npm install --save broccoli-colorguard

Usage

var compileSass = require('broccoli-sass');
var colorguard = require('broccoli-colorguard');

// This doesn't have to be sass. It could be broccoli-concat, or broccoli-uglify
// or any other broccoli plugin that results in a single output file.
var cssTree = compileSass(inputTree, 'myapp/app.scss', 'assets/app.css', {
  sassoptions: 'go here'
});

// Colorguard always returns exactly what you gave it. But it might throw errors before that
// happens. In this case, it gets the full built output from sass so it knows how to parse it.
cssTree = colorguard(cssTree, {
  threshold: 3,
  ignore: ['#555555'],
  whitelist: [['#000000', '#010101']]
});

module.exports = cssTree;

API

colorguard(tree, opts)

Initialize a new colorguard with the given string of regular CSS. Optionally supply an object with options as the last argument.

Options

These are blindly passed to colorguard. See options there.

License

Apache 2

Thanks

Heavily cargo-culted from kevva/broccoli-rework

Keywords

FAQs

Package last updated on 07 Jul 2014

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