// the find
remy/inliner
Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
Inliner takes a URL or local HTML file and produces a single self-contained HTML file with all CSS, JS, and images base64-encoded or inlined. It was designed for the appcache era of mobile web development, when reducing HTTP round-trips was the primary offline strategy.
The test suite is thorough — 70+ fixture pairs covering edge cases like charset detection, SVG compression, IE conditional comments, and CSS @import recursion. The task-based architecture in lib/tasks/ keeps each asset type independently testable. It handles the genuinely fiddly stuff: CSS images, video posters, style attributes, and SVG inlining all get separate treatment rather than one regex sweep. The skip logic for Google Analytics and unreachable scripts is pragmatic — it fails gracefully instead of aborting the whole run.
Abandoned in 2022 and built for a use case (AppCache) that browsers removed in 2022. The callback-based API with EventEmitter rather than Promises/async makes composition awkward in modern code. Whitespace collapsing is blunt — it touches all text nodes equally, which breaks inline elements in ways the README admits but doesn't solve. UglifyJS 2.x is pinned, so any page using modern JS syntax (optional chaining, nullish coalescing) will fail to compress or error out. There is no streaming output, so large pages load entirely into memory before anything is written.