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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gulp-winify

v0.1.2-alpha.3

Published

Aggressive CSS/HTML minifier

Downloads

29

Readme

Winify

Minify your CSS up to 30% smaller than other minifiers alone.

This plugin reads the classes in your CSS selectors and converts them to one-character long minified names. These new class names and ids are then added to your HTML files, along with the original classes.

More improvements are coming, including CSS property minification, tag minification and jQuery selector support.

This project is still in early stages so make sure to test before making production builds with it.

##How it works:

The selectors in your CSS get minified. Each class (and optionally, id) are reduced to one unique UTF-8 character, which is added as a separate class to the original element in your HTML. None of the original HTML is replaced, so there are no side effects.

Example:

This CSS:

.billing-address__input.selected {...}

Is minified to this:

.¢.♥ {...}

And your HTML goes from this:

<div class="billing-address__input selected">...</div>

To this:

<div class="billing-address__input ¢ selected ♥">...</div>

##Install:

To install, type npm install --save gulp-winify

Example Gulpfile:

var gulp = require('gulp');
var winify = require('gulp-winify');
var cssnano = require('gulp-cssnano');

gulp.task('default', function(){
  return gulp.src( ['./src/*.css', './src/*.html'] )
    .pipe( winify() )
    .pipe( cssnano() )
    .pipe( gulp.dest('./dist') ); 
});

Winify can also be called in separate gulp tasks with no issues:

gulp.task('html', function(){
  return gulp.src( './src/*.html' )
  	.pipe( winify() )
    .pipe( gulp.dest('./dist') ); 
});

gulp.task('css', function(){
  return gulp.src( './src/*.css' )
  	.pipe( winify() )
    .pipe( gulp.dest('./dist') ); 
});

###Options: An options object can be passed into your gulpfile's call to winify(). Options will usually be for enabling features in development, or features that might be too aggressive for some projects.

experimental: true: Turn on experimental features currently in development. (Default: false) alphabeticSelectors: true: Start minified class characters at alphabetic letters [A-z]. (Default: false) minifyIds: true: Minify ids. (Currently will add a second id until class/id replacement is developed. Two ids on one element isn't valid in HTML and will cause browser issues until then). (Default: false)

Example gulpfile call:
.pipe( winify({ experimental: true }) )

##Future Plans:

JavaScript Support

Add the option to minify jQuery selectors and JavaScript DOM manipulation

Property minification

Create a new class for style properties that are used multiple times. CSS properties are repeated often, and in large projects this can cut file size even more than minifying selectors can.

.billing-address__input.selected {
	background-color: #9238E6;
}
...
.login__form .selected {
	background-color: #9238E6;
}

Will turn into

.√ {
	background-color: #9238E6;
}

Possible features:

HTML Replacement

Add the option to replace classes and ids in the html instead of adding new ones. This requires JavaScript to be parsed and selectors to be replaced along with the CSS and HTML

Tag minification:

Using JavaScript's document.registerElement to let custom minified tags replace normal tags for browsers that support it.

Grunt or purely Node.js plugins

##Contributing:
Feel free to fork and make a pull request, any help is welcome

##License
MIT © Adam Chamberland