npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-polish

v5.0.2

Published

Make your stylesheets perfect. Add an extra coat of polish.

Downloads

3

Readme

gulp-polish

Build Status codecov.io bitHound Overall Score bitHound Dependencies

gulp plugin for integrating Polish.

Install

npm install --save gulp-polish

Gulp task

var gulp   = require('gulp');
var polish = require('gulp-polish');

gulp.task('polish', function() {
  return gulp.src('./test_stylesheets/**/*.scss')
    .pipe(polish())
    .pipe(polish.reporter());
});

Results

gulp-polish adds the following properties to the file object:

file.polish.success = false;  // or true, if there aren't any warnings or errors!

file.polish.errors = [...];   // Every failure with severity 2
file.polish.warnings = [...]; // Every failure with severity 1

Configuring rules

To configure which rules are applied on a per-directory basis, use .polish.json files. The config will inherit from its parents directories. Just create a simple JSON object that specifies rules to include/exclude by filename.

{
  "config": [
    {
      "module"   : "polish-no-styling-elements",
      "severity" : 2 // an error
    },
    {
      "module"   : "polish-no-bang-important",
      "severity" : 1 // a warning
    },
    {
      "module"    : "polish-no-banned-selectors",
      "severity"  : 0 // ignored,
      "selectors" : [".these", "#will", ".be", "#banned"]
    }
  ],
  "fileConfig": {
    // individual files can be configured like this
    "_colors.scss": [
      {
        "module"    : "polish-use-color-variables",
        "severity"  : 0
      }
    ]
  }
}

If you want to disable a particular ruleset in a file, you can do an inline config that will apply only to the next rule in the sheet:

/* polish no-styling-ids=false */
#now-this-wont-be-an-error {
  color: green;
}

#but-this-one-will-be {
  color: red;
}

License

This project is licensed under the terms of the MIT license.