Registry / devops / ember-hbs-minifier

ember-hbs-minifier

JSON →
library1.3.0jsnpmunverified

Ember addon that automatically strips unnecessary whitespace from Handlebars templates during build. Current stable version 1.3.0. Released in 2021, low release cadence. Differentiator: automatic minification without tilde syntax, respects <pre> tags and custom skip configuration. Experimental, not recommended for production.

npm install ember-hbs-minifier
INSTALL
IMPORT
SIG · EMBER-HBS-MINIFIER
E
ember-hbs-minifier
devopsjavascriptv1.3.0
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.

ember-hbs-minifier
ember install ember-hbs-minifier
Addon is applied automatically after installation; no explicit import needed.
Configuration
let app = new EmberApp({ 'ember-hbs-minifier': { skip: { elements: ['pre'] } } });
new EmberApp({ emberHbsMinifier: ... })
Must be a string key with hyphens in ember-cli-build.js

Demonstrates installation and basic configuration of whitespace stripping.

ember install ember-hbs-minifier // After installation, templates are automatically minified. // To customize skip options, edit ember-cli-build.js: let app = new EmberApp({ 'ember-hbs-minifier': { skip: { classes: [], elements: ['pre'], components: ['no-minify'] } } }); module.exports = app.toTree();
Debug
Known issues
deprecatedThis addon is experimental and may change in the future. Not recommended for production.
fix
Use official Handlebars whitespace control ({{~...~}}) for production.
affects: all
gotchaWhitespace stripping does not work across component/template boundaries.
fix
Use manual whitespace control inside components.
affects: >=0.0.0
Errors
Common errors & fixes
Expected a string with hyphens for addon config key
Using camelCase instead of hyphenated string in ember-cli-build.js
fix
Use 'ember-hbs-minifier' (string with hyphens) as the configuration key.
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
ember-hbs-minifier — npm install ember-hbs-minifier · libregistry