JLTO (Jinja Like Templates Optimizer) is a Node.js tool for minifying and optimizing templates from Jinja-like engines (Nunjucks, Twig.js, LiquidNode, etc.). As of v1.5.4, it strips whitespace, removes comments, and optionally minifies HTML via html-minifier-next. It supports custom delimiters and engine-specific syntax. Released under MIT, it is a niche alternative to build-tool plugins, offering programmatic optimization via optimizeString(). It is actively maintained with frequent patch updates.
npm install jltoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: require jlto and call optimizeString with a template to remove extra whitespace and spaces in tags.
Use await or .then() on optimizeString calls.
Run npm install html-minifier-next or skip minification.
Pass expressionStart, expressionEnd, etc. options to customize for non-default engines.
Use const jlto = require('jlto'); then jlto.optimizeString(...)Install html-minifier-next: npm install html-minifier-next