This addon removes newlines on compile stage, for cases like this:
to this:
* any text nodes inside <pre>
, <code>
will be saved.
** single space nodes will be saved.
** text nodes having text + (newlines || spaces) will be saved
this reduces glimmer-vm
opcodes count, memory usage, and increase final rendering/rerendering speed.
Bonus:
* This addon DON'T modify nodes (including text content), it only remove matched.
Stats fom one of my projects (gzipped results):
template-trimmer
: 150.42 ->
144.92 kb
ember-hbs-minifier
: 150.42 ->
144.96 kb
template-trimmer
+ ember-hbs-minifier
: 150.42 ->
144.71 kb
Can I use it with ember-hbs-minifier?
- Yes
- Ember.js v2.18 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
ember install ember-cli-template-trimmer
[Longer description of how to use the addon in apps.]
See the Contributing guide for details.
This project is licensed under the MIT License.