Registry / devops / unreadable

unreadable

JSON →
library0.0.15jsnpmunverified

CSS-aware HTML minifier that aggressively removes whitespace while preserving layout by analyzing each element's CSS properties. It minifies inline JavaScript and CSS using UglifyJS and clean-css. Version 0.0.15 has no stable release cadence; the project appears abandoned (last commit in 2014). Key differentiator: layout-safe minification via PhantomJS inspection. Requires PhantomJS to be installed separately.

npm install unreadable
INSTALL
IMPORT
SIG · UNREADABLE
U
unreadable
devopsjavascriptv0.0.15
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.

unreadable
import { unreadable } from 'unreadable'
const unreadable = require('unreadable'); // Not a CommonJS module
Package is a CLI tool, not a library. It provides a command-line interface and does not export a programmatic API in Node.js.
command
unreadable --url http://... --output file.html
unreadable -i -u http://... -o file.html // Wrong flag order; -i expects URL
Use CLI flags as shown in README. Flags are not positional.
defaults
const fs = require('fs'); const defaults = JSON.parse(fs.readFileSync(require.resolve('unreadable/defaults.json'), 'utf8'));
require('unreadable/defaults') // Does not exist as a module
Configuration defaults can be accessed via file path.

Minifies an HTML page from a URL, using --inspect to verify layout safety, and writes to output file.

unreadable --url http://example.com --inspect --output example.min.html
Debug
Known issues
deprecatedPackage is no longer maintained; last update in 2014. It relies on PhantomJS which is also deprecated.
fix
Consider using html-minifier-terser with CSS awareness or similar tools.
affects: >=0.0.1
gotchaRequires PhantomJS (not included) to be installed globally and available in PATH.
fix
Install PhantomJS via brew, apt, or download from phantomjs.org.
affects: >=0.0.1
gotchaMay break layout by default; --inspect flag is needed to verify safety but slows down processing.
fix
Always use --inspect when testing layout integrity. Use --config to fine-tune.
affects: >=0.0.1
gotchaMinification of inline scripts uses UglifyJS (not UglifyJS2) which may not support ES6+ syntax.
fix
Avoid using modern JavaScript in source HTML, or pre-minify scripts externally.
affects: >=0.0.1
breakingNo versioning schema; breaking changes may occur between any patch versions.
fix
Pin to specific version if used in automated processes.
affects: <0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'phantomjs'
PhantomJS is not installed or not in PATH.
fix
Install PhantomJS from http://phantomjs.org/download.html and add to PATH.
unreadable: command not found
Package not installed globally.
fix
Run npm install -g unreadable
TypeError: undefined is not a function
Attempting to import unreadable as a module; it's a CLI tool.
fix
Use command line: npx unreadable ...
Error: Unable to open file 'defaults.json'
Trying to load defaults from wrong path.
fix
Use require.resolve('unreadable/defaults.json') or copy the file.
Upgrade
Version history
0.0.15latest on npm
Audit
Dependencies
phantomjsrequiredRuntime dependency for inspecting layout via headless browser
Agent activity
4 hits · last 30 days
node
4
Resources
unreadable — npm install unreadable · libregistry