2.1.0 • Published 3 years ago

ember-cli-htmlbars-minifier v2.1.0

Weekly downloads
382
License
MIT
Repository
github
Last release
3 years ago

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 OptionDescription
stripIndentationRemove any consecutive sets of tabs or spaces from the beginning of each line.
removeTrailingSpacesRemove any whitespace that may be at the end of each line.
removeSpacesAroundTagsRemove any whitespace that occurs before or after an HTML tag or Handlebars tag
stripNewlinesRemove all newlines from the template (except those that are inside an open tag, which will be ignored by the HTMLBars/Glimmer parser anyway).
coalesceSpacesReplace 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