Skip to content

Commit

Permalink
Update Readme with syntax for usage with tagged templates
Browse files Browse the repository at this point in the history
  • Loading branch information
thec0keman authored and John Ratcliff committed Nov 11, 2019
1 parent d1b9683 commit 8731b5a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,38 @@ module.exports = {
};
```

### Tagged Template Usage / Migrating from `htmlbars-inline-precompile`

Starting with version 4.0, this addon now includes the testing helper from [ember-cli-htmlbars-inline-precompile](https://github.com/ember-cli/ember-cli-htmlbars-inline-precompile)

This will require an update to the imports of the `hbs` helper in your tests:

Prior syntax:

```
import hbs from 'htmlbars-inline-precompile';
...
await render(hbs`
<MyComponent />
`);
```

New syntax:

```
import { hbs } from 'ember-cli-htmlbars';
...
await render(hbs`
<MyComponent />
`);
```

There is a [codemod](https://github.com/ember-codemods/ember-cli-htmlbars-inline-precompile-codemod) available to automate this change.

### Handlebars 2.0 Support (Ember < 1.10)

Handlebars 2.0 support has been removed. If you are using ember-cli-htmlbars with a 1.9.x project please continue
Expand Down

0 comments on commit 8731b5a

Please sign in to comment.