ember-cli-htmlbars-minifier

2.1.0 • Public • Published

ember-cli-htmlbars-minifier

Build Status GitHub version NPM version Dependency Status codecov Ember Observer Score

Information

NPM

  • Ember.js v3.20 or above
  • Ember CLI v3.20 or above
  • Node.js v10 or above

Install in ember-cli application

In your application's directory:

npm install ember-cli-htmlbars-minifier --save-dev

Configuration

You can choose not to remove certain kinds of whitespace using config options that you can add to your ember-cli-build.js. If not specified, they default to true.

"htmlbarsMinifier": {
    stripIndentation:       true,
    removeTrailingSpaces:   true,
    removeSpacesAroundTags: true,
    stripNewlines:          true,
    coalesceSpaces:         true
}
Config Option Description
stripIndentation Remove any consecutive sets of tabs or spaces from the beginning of each line.
removeTrailingSpaces Remove any whitespace that may be at the end of each line.
removeSpacesAroundTags Remove any whitespace that occurs before or after an HTML tag or Handlebars tag
stripNewlines Remove all newlines from the template (except those that are inside an open tag, which will be ignored by the HTMLBars/Glimmer parser anyway).
coalesceSpaces Replace any runs of multiple whitespaces with a single space.

Contributing

We're thankful to the community for contributing any improvements.

Do not forget to follow our eslint rules and make test for the new functionalities/fixes.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Package Sidebar

Install

npm i ember-cli-htmlbars-minifier

Weekly Downloads

104

Version

2.1.0

License

MIT

Unpacked Size

27 kB

Total Files

24

Last publish

Collaborators

  • josex2r
  • adrigzr
  • shokmaster
  • bbvaengineer