Registry / devops / ekit-minify

ekit-minify

JSON →
library0.2.1jsnpmunverified

A minifier for JS, CSS, HTML, and images (including base64 encoding for images in CSS), extended from the original 'minify' package. Version 0.2.1 is the current stable release, last updated in 2012. It relies on UglifyJS, clean-css, html-minifier, and css-b64-images as backend tools, which must be installed separately. Primarily designed for Node.js >=0.4.0, with both CLI and programmatic API. Compared to modern alternatives (e.g., terser, cssnano, html-minifier-terser), it is outdated and lacks active maintenance.

npm install ekit-minify
INSTALL
IMPORT
SIG · EKIT-MINIFY
E
ekit-minify
devopsjavascriptv0.2.1
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.

minify
import minify from 'minify'
const minify = require('minify')
ES module import; CommonJS also works.
optimize
import { optimize } from 'minify'
const optimize = require('minify').optimize
Named export available; also accessible via default export.
MinFolder
import { MinFolder } from 'minify'
const MinFolder = require('minify').MinFolder
Variable containing folder name for minimized files.

Demonstrates basic usage of the minify.optimize API to minify JS, CSS, HTML, and optionally convert images to base64.

import minify from 'minify'; // Minify a single JavaScript file minify.optimize('script.js', { callback: function(chunk) { console.log('Minified content:', chunk); } }); // Minify multiple files minify.optimize(['style.css', 'index.html']); // With image base64 conversion in CSS minify.optimize([{ 'style.css': { img: true, merge: true } }, 'index.html']);
Debug
Known issues
deprecatedPackage last updated in 2012; no longer maintained.
fix
Migrate to modern toolchains like esbuild, terser, cssnano, or html-minifier-terser.
affects: >=0.0.0
gotchaBackend minifiers (uglify-js, clean-css, html-minifier, css-b64-images) are not bundled and must be installed separately.
fix
Run 'npm install uglify-js clean-css html-minifier css-b64-images' before using ekit-minify.
affects: >=0.0.0
gotchaThe 'optimize' callback receives a single chunk argument (string), not the typical error-first format.
fix
Use callback(chunk) instead of callback(err, chunk).
affects: >=0.0.0
breakingThe 'MinFolder' property may return 'min/' or '/' depending on directory creation success; inconsistent across platforms.
fix
Avoid relying on MinFolder and specify custom output paths.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'uglify-js'
Optional backend dependencies not installed.
fix
Run 'npm install uglify-js clean-css html-minifier css-b64-images'.
TypeError: callback is not a function
When passing options object without a callback property.
fix
Ensure options object includes a callback function, e.g., { callback: (chunk) => { ... } }.
ReferenceError: minify is not defined
Using require or import incorrectly (e.g., missing default import or wrong path).
fix
Use 'import minify from 'minify'' (for ESM) or 'const minify = require('minify')' (for CJS).
Upgrade
Version history
0.2.1latest on npm
Audit
Dependencies
uglify-jsoptionalRequired for JavaScript minification
clean-cssoptionalRequired for CSS minification
html-minifieroptionalRequired for HTML minification
css-b64-imagesoptionalRequired for image base64 encoding in CSS
Agent activity
4 hits · last 30 days
node
4
Resources
ekit-minify — npm install ekit-minify · libregistry