# ember-cli-htmlbars-minifier

> Removes all whitespace in htmlbars templates

Latest version **2.1.0** (published 2021-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-htmlbars-minifier
pnpm add ember-cli-htmlbars-minifier
yarn add ember-cli-htmlbars-minifier
bun add ember-cli-htmlbars-minifier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2021-08-23 |
| First published | 2016-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 26.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | BBVAEngineering |
| Maintainers | josex2r, adrigzr, shokmaster, bbvaengineer |
| Keywords | ember-addon, minify, compress, htmlbars, htmlbars-minifier |

## Links

- npm: https://www.npmjs.com/package/ember-cli-htmlbars-minifier
- Repository: https://github.com/BBVAEngineering/ember-cli-htmlbars-minifier
- Homepage: https://github.com/BBVAEngineering/ember-cli-htmlbars-minifier#readme
- Issues: https://github.com/BBVAEngineering/ember-cli-htmlbars-minifier/issues
- npm.io page: https://npm.io/package/ember-cli-htmlbars-minifier

## Dependencies (2)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^7.26.6
- [broccoli-persistent-filter](https://npm.io/package/broccoli-persistent-filter.md) ^3.1.2

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2021-08-23
- 2.0.1 — 2019-02-25
- 1.2.0 — 2018-09-12
- 1.1.0 — 2017-12-20
- 1.0.0 — 2017-12-19
- 0.1.2 — 2016-02-16
- 0.1.1 — 2016-02-11
- 0.1.0 — 2016-02-11

## README

# ember-cli-htmlbars-minifier

[![Build Status](https://travis-ci.org/BBVAEngineering/ember-cli-htmlbars-minifier.svg?branch=master)](https://travis-ci.org/BBVAEngineering/ember-cli-htmlbars-minifier)
[![GitHub version](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-htmlbars-minifier.svg)](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-htmlbars-minifier)
[![NPM version](https://badge.fury.io/js/ember-cli-htmlbars-minifier.svg)](https://badge.fury.io/js/ember-cli-htmlbars-minifier)
[![Dependency Status](https://david-dm.org/BBVAEngineering/ember-cli-htmlbars-minifier.svg)](https://david-dm.org/BBVAEngineering/ember-cli-htmlbars-minifier)
[![codecov](https://codecov.io/gh/BBVAEngineering/ember-cli-htmlbars-minifier/branch/master/graph/badge.svg)](https://codecov.io/gh/BBVAEngineering/ember-cli-htmlbars-minifier)
[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-htmlbars-minifier.svg)](https://emberobserver.com/addons/ember-cli-htmlbars-minifier)

## Information

[![NPM](https://nodei.co/npm/ember-cli-htmlbars-minifier.png?downloads=true&downloadRank=true)](https://nodei.co/npm/ember-cli-htmlbars-minifier/)

- 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](https://github.com/BBVAEngineering/javascript/tree/master/eslint-config-bbva) rules and make test for the new functionalities/fixes.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BBVAEngineering/ember-cli-htmlbars-minifier/tags).

## Authors

See the list of [contributors](https://github.com/BBVAEngineering/ember-cli-htmlbars-minifier/graphs/contributors) who participated in this project.

## License

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

---
_Source: https://npm.io/package/ember-cli-htmlbars-minifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
