{"id":41196,"library":"gulp-html-minifier","title":"gulp-html-minifier","description":"Gulp plugin that minifies HTML using the html-minifier library. Version 0.1.8 is the latest stable release. The plugin wraps html-minifier's options, adding convenience features like ignorePath (to remove path segments from output) and an environment flag to skip minification in development. It is a legacy gulp plugin from the early gulp ecosystem, relying on gulp streams (not through2 or newer patterns). No longer actively maintained; consider using gulp-htmlmin or integrating html-minifier directly.","status":"abandoned","version":"0.1.8","language":"javascript","source_language":"en","source_url":"https://github.com/origin1tech/gulp-html-minifier","tags":["javascript","gulpplugin","html","html minifier","html minify","minify"],"install":[{"cmd":"npm install gulp-html-minifier","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-html-minifier","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-html-minifier","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for gulp plugin compatibility.","package":"gulp","optional":false},{"reason":"Core minification engine.","package":"html-minifier","optional":false}],"imports":[{"note":"CommonJS require works, but ES default import is also valid. The module exports a single function.","wrong":"var htmlmin = require('gulp-html-minifier');","symbol":"default","correct":"import htmlmin from 'gulp-html-minifier';"},{"note":"No named exports; only default export.","wrong":"const { minify } = require('gulp-html-minifier');","symbol":"named (none)","correct":"const htmlmin = require('gulp-html-minifier');"},{"note":"Options are passed directly to the function call, not via separate .minify() method.","wrong":".pipe(htmlmin().on('error', ...))","symbol":"gulp pipe usage","correct":".pipe(htmlmin({ collapseWhitespace: true }))"}],"quickstart":{"code":"const gulp = require('gulp');\nconst htmlmin = require('gulp-html-minifier');\n\ngulp.task('minify-html', () => {\n  return gulp.src('src/**/*.html')\n    .pipe(htmlmin({\n      removeComments: true,\n      collapseWhitespace: true,\n      removeAttributeQuotes: true,\n      minifyJS: true,\n      minifyCSS: true\n    }))\n    .pipe(gulp.dest('dist'));\n});","lang":"javascript","description":"Basic gulp task that minifies all HTML files with common html-minifier options and outputs to dist."},"warnings":[{"fix":"Switch to 'gulp-htmlmin' (gulp plugin) or use html-minifier directly with through2.","message":"This package is no longer maintained. Use gulp-htmlmin or html-minifier directly.","severity":"deprecated","affected_versions":">=0"},{"fix":"Use gulp v3 or wrap the stream with `through2` and handle `end` event properly.","message":"The package does not support gulp v4's async completion. Tasks may not finish properly.","severity":"gotcha","affected_versions":">=0.1.8"},{"fix":"Check html-minifier docs for all options; some may not be passed through.","message":"Options object includes 'env' to skip minification. Not all html-minifier options are exposed.","severity":"gotcha","affected_versions":">=0.1.8"}],"env_vars":null,"search_vec":"'0.1.8':17 'activ':73 'ad':31 'consid':75 'conveni':32 'develop':50 'direct':85 'earli':59 'ecosystem':61 'environ':44 'featur':33 'flag':45 'gulp':2,5,55,60,64,78 'gulp-html-minifi':1 'gulp-htmlmin':77 'gulpplugin':87 'html':3,9,13,27,83,88,89,91 'html-minifi':12,26,82 'htmlmin':79 'ignorepath':35 'integr':81 'javascript':86 'latest':20 'legaci':54 'librari':15 'like':34 'longer':72 'maintain':74 'minif':48 'minifi':4,8,14,28,84,90,92,93 'newer':69 'option':30 'output':41 'path':38 'pattern':70 'plugin':6,24,56 'releas':22 'reli':62 'remov':37 'segment':39 'skip':47 'stabl':21 'stream':65 'through2':67 'use':10,76 'version':16 'wrap':25","created_at":"2026-06-04T18:51:14.550073+00:00","updated_at":"2026-06-04T18:51:14.550073+00:00","problems":[{"fix":"Run 'npm install gulp-html-minifier' (note hyphens).","cause":"Package not installed or misspelled.","error":"Error: Cannot find module 'gulp-html-minifier'"},{"fix":"Use 'const htmlmin = require('gulp-html-minifier');' or import default.","cause":"Using named import 'htmlmin' when it's a default export.","error":"TypeError: htmlmin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/origin1tech/gulp-html-minifier","github":"https://github.com/origin1tech/gulp-html-minifier","docs":null,"changelog":null,"pypi":null,"npm":"gulp-html-minifier","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}