Registry / devops / hexo-all-minifier

hexo-all-minifier

JSON →
library0.5.7jsnpmunverified

Hexo plugin that minifies HTML, CSS, JS, and images in one package. Version 0.5.7 supports Node >=10. Low maintenance with infrequent updates since 2019. Integrates with Hexo build pipeline via configuration flags. Differentiator: all-in-one minification with options per asset type (html, css, js, image), plus a JS concator feature to bundle scripts. Alternatives like hexo-filter-optimize require multiple plugins.

npm install hexo-all-minifier
INSTALL
IMPORT
SIG · HEXO-ALL-MINIFIER
H
hexo-all-minifier
devopsjavascriptv0.5.7
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.

hexo-all-minifier
npm install hexo-all-minifier --save
npm install hexo-all-minifier --save-dev
Must be installed as a runtime dependency, not devDependency, for Hexo to load it.
all_minifier config
all_minifier: true
all_minifier: enable: true
The top-level config is a boolean, not an object. Enable specific minifiers with their own sections.
HTML minifier config
html_minifier: enable: true exclude: - '*.min.html'
html_minifier: enabled: true
Use 'enable' not 'enabled'. Boolean values are required.

Configuration to enable all minifiers with basic exclusions for already minified files.

// 1. Install // npm install hexo-all-minifier --save // 2. In _config.yml: all_minifier: true html_minifier: enable: true silent: false css_minifier: enable: true exclude: - '*.min.css' js_minifier: enable: true mangle: true exclude: - '*.min.js' image_minifier: enable: true optimizationLevel: 2 progressive: true // 3. Run: hexo generate
Debug
Known issues
gotchaJS minifier 'output' and 'compress' options: setting them to empty in YAML results in null, not undefined, breaking the minification.
fix
Remove empty 'output:' or 'compress:' lines from _config.yml entirely.
affects: >=0.4.0
gotchaImage minifier uses imagemin-pngquant only when pngquant:true, but requires external binaries on macOS (libtool, automake, autoconf, nasm).
fix
Install build dependencies: brew install libtool automake autoconf nasm
affects: all
deprecatedGreenkeeper badge indicates automated dependency checking was used; project has not been updated since 2019 and may have vulnerable dependencies.
fix
Consider migrating to hexo-filter-optimize or manually auditing dependencies.
affects: all
gotchaJS_Concator feature (v0.4.0) bundles local scripts but excludes remote/absolute URLs; bundle attached to end of body unless front:true.
fix
Ensure all local scripts are included; use front:true to change order if needed.
affects: >=0.4.0
Errors
Common errors & fixes
TypeError: Cannot read property 'replace' of undefined
Empty 'output' or 'compress' in YAML config for js_minifier, passing null to UglifyJS.
fix
Remove empty 'output:' and 'compress:' lines from _config.yml
Error: Cannot find module 'imagemin'
Missing peer dependency imagemin when image_minifier is enabled.
fix
Run: npm install imagemin --save-dev
hexo-all-minifier: Image minification failed - /path/to/image.png
Missing system libraries for pngquant or other image tools on macOS/Linux.
fix
Install build dependencies: brew install libtool automake autoconf nasm (macOS) or apt-get install build-essential nasm (Linux)
Upgrade
Version history
0.5.7latest on npm
Audit
Dependencies
hexorequiredCore peer dependency; plugin only works within Hexo
Agent activity
6 hits · last 30 days
node
6
Resources
hexo-all-minifier — npm install hexo-all-minifier · libregistry