Registry / devops / gulp-winify

gulp-winify

JSON →
library0.1.2-alpha.3jsnpmunverified

Aggressive CSS/HTML minifier for Gulp that renames CSS class selectors to single UTF-8 characters, reducing CSS size up to 30% beyond typical minifiers. Version 0.1.2-alpha.3, early stage with experimental options. Unlike standard minifiers (cssnano, clean-css), it performs semantic renaming of selectors, but may break functionality if classes are used in JavaScript or jQuery. Requires Node >=4.0.0. Not suitable for production without thorough testing.

npm install gulp-winify
INSTALL
IMPORT
SIG · GULP-WINIFY
G
gulp-winify
devopsjavascriptv0.1.2-alpha.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

winify (default)
import winify from 'gulp-winify'
const { winify } = require('gulp-winify')
ESM default import; also works with CommonJS require('gulp-winify') returning the plugin function

Shows a Gulp task using winify with experimental option and cssnano to minify CSS and HTML.

import gulp from 'gulp'; import winify from 'gulp-winify'; import cssnano from 'gulp-cssnano'; gulp.task('default', () => { return gulp.src(['./src/*.css', './src/*.html']) .pipe(winify({ experimental: true, minifyIds: false })) .pipe(cssnano()) .pipe(gulp.dest('./dist')); });
Debug
Known issues
breakingminifyIds option adds a second id to elements, causing invalid HTML and potential browser issues.
fix
Avoid using minifyIds: true until id replacement is implemented, or ensure your project tolerates duplicate ids.
affects: >=0.0.0
deprecatedPlugin is alpha and may break with future Gulp versions or Node updates.
fix
Pin Gulp and Node versions, or consider alternative mature minifiers.
affects: >=0.0.0
gotchaJavaScript/jQuery selectors referencing classes by name will break after minification because class names are changed.
fix
Only use winify on projects with no JS reliance on class names, or whitelist classes via options (not yet supported).
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'gulp-winify'
Package not installed or import path incorrect.
fix
Run npm install --save-dev gulp-winify and ensure node_modules includes it.
TypeError: winify is not a function
Incorrect import style (e.g., destructuring default export).
fix
Use const winify = require('gulp-winify'); or import winify from 'gulp-winify';
Upgrade
Version history
0.1.2-alpha.3latest on npm
Audit
Dependencies
gulprequiredpeer dependency for gulp plugin
through2requiredstream transform utility
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
gulp-winify — npm install gulp-winify · libregistry