Skip to content

Latest commit

 

History

History
103 lines (77 loc) · 4.8 KB

CHANGELOG.md

File metadata and controls

103 lines (77 loc) · 4.8 KB
  • Bump support for Handlebars >= 2.0 #315

[0.10.0# 0.10.0

  • Refactoring for clarity and consistency of bracketed attributes, both for mustache and HTML elements #312
  • Fix attributes with bound classes and unless #311
  • Named Args and Named Blocks Syntax #301
  • Move HTML attribute quoting behind a feature toggle
  • Properly quote mustache for non-event HTML attributes
  • Add some missing event aliases
  • Fix issue with number literals as HTML attributes
  • Tests run on Node 4
  • Support bracket params in subexpressions
  • block params no longer allow subexpressions
  • else / else if nodes should now accept the full range of mustache attrs
  • bracketed attrs can have comments (sort of)
  • added yarn
  • Fix variation on subexpressions
  • Add menuitem as HTML element
  • Fix bug with actions that have 'action' as a value
  • Fix issue with bracketed attributes without blocks
  • Add a wider variety of support for bracketed attributes and blocks / block params
  • Initial support for glimmer components using % helper
  • Fix issue with comments breaking if / else block indentation
  • Fix issue with multiple nested subexpressions
  • Allow for a wider range of attribute options on dom elements (i.e. full range of closure action syntax)
  • Allow slashes in attr values
  • Added new spacing helper: + will add an extra space before line
  • Fixed a bug with bound attributes in brackets
  • Fixed a bug with using a pipe and a bound variable

Emblem no longer outputs {{bind-attr}}s for attribute bindings, but instead outputs HTMLBars bound attribute syntax, e.g.

p class=foo Hello

generates:

<p class={{foo}}>Hello</p>

Likewise, colon syntax for class names will map to an inline if:

div class=foo:bar:baz                        =>    <div class={{ if foo 'bar' 'baz' }}>
.alert class=foo:bar:baz                     =>    <div class="alert {{ if foo 'bar' 'baz' }}">
.alert class={ foo:bar:baz one:two:three }   =>    <div class="alert {{ if foo 'bar' 'baz'}} {{if one 'two' 'three'}}">

Added support for block params.

As of version 0.5.0, the output of an Emblem compile call is a Handlebars-syntax string that can then be compiled by Handlebars.

This represents a breaking change for toolchains that expect Emblem's compile output to be an executable compiled Handlebars template function, but from an end-user perspective the Emblem syntax should be mostly backward-compatible.

Note: Some of the "vanilla Handlebars" syntax for Emblem has not yet been ported, especially in cases where it conflicts with (or is unsupported by) the expected output for the same syntax with "Ember Handlebars". In future releases it will be possible to compile Emblem templates separately for "vanilla" Handlebars and "Ember" handlebars syntaxes.