{"id":42071,"library":"task-htmlminifier","title":"task-htmlminifier","description":"A task-based wrapper around html-minifier for minifying HTML files. Version 0.1.0, released July 2014. No further updates. Provides a simple `run()` method for batch minification with full html-minifier options. Differentiated by its task-oriented API, but limited documentation and no active maintenance.","status":"deprecated","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/taskjs/task-htmlminifier","tags":["javascript","task","htmlminifier"],"install":[{"cmd":"npm install task-htmlminifier","lang":"bash","label":"npm"},{"cmd":"yarn add task-htmlminifier","lang":"bash","label":"yarn"},{"cmd":"pnpm add task-htmlminifier","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core minification logic","package":"html-minifier","optional":false}],"imports":[{"note":"CommonJS only; no ESM support.","wrong":"import HtmlMinifierTask from 'task-htmlminifier';","symbol":"task-htmlminifier","correct":"const HtmlMinifierTask = require('task-htmlminifier');"},{"note":"Constructor must be called with `new`.","wrong":"const task = HtmlMinifierTask();","symbol":"task instance","correct":"const task = new HtmlMinifierTask();"},{"note":"The only API method is `run`; no other methods.","wrong":"task.htmlminifier(inputs, options)","symbol":"run method","correct":"task.run(inputs, options, logger)"}],"quickstart":{"code":"const HtmlMinifierTask = require('task-htmlminifier');\nconst htmlminifier = new HtmlMinifierTask();\n\nconst inputs = ['index.html', 'about.html'];\nconst options = {\n  removeComments: true,\n  collapseWhitespace: true\n};\nconst logger = console;\n\nhtmlminifier.run(inputs, options, logger);","lang":"javascript","description":"Basic usage: create instance, define inputs and options, then call run()."},"warnings":[{"fix":"Use modern alternatives like html-minifier directly or html-minifier-terser.","message":"Package is no longer maintained since 2014.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Wrap run() in a Promise or use async/await with a callback logger.","message":"The 'run()' method does not return a promise; it relies on the logger for callbacks.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Validate options against html-minifier documentation before passing.","message":"Options are passed directly to html-minifier; malformed options cause silent failures.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.0':18 '2014':21 'activ':51 'api':45 'around':9 'base':7 'batch':31 'differenti':39 'document':48 'file':16 'full':34 'html':11,15,36 'html-minifi':10,35 'htmlminifi':3,55 'javascript':53 'juli':20 'limit':47 'mainten':52 'method':29 'minif':32 'minifi':12,14,37 'option':38 'orient':44 'provid':25 'releas':19 'run':28 'simpl':27 'task':2,6,43,54 'task-bas':5 'task-htmlminifi':1 'task-ori':42 'updat':24 'version':17 'wrapper':8","created_at":"2026-06-04T18:55:28.848543+00:00","updated_at":"2026-06-04T18:55:28.848543+00:00","problems":[{"fix":"Use 'new HtmlMinifierTask()' and ensure correct require.","cause":"Instantiated without 'new' or wrong export usage.","error":"TypeError: htmlminifier.run is not a function"},{"fix":"Run 'npm install html-minifier'.","cause":"Dependency 'html-minifier' not installed.","error":"Cannot find module 'html-minifier'"},{"fix":"Pass an array of file paths to the run method.","cause":"Inputs argument not provided or undefined.","error":"ReferenceError: inputs is not defined"}],"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/taskjs/task-htmlminifier","github":"https://github.com/taskjs/task-htmlminifier","docs":null,"changelog":null,"pypi":null,"npm":"task-htmlminifier","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}}