Skip to content

Commit 8731b5a

Browse files
thec0kemanJohn Ratcliff
authored andcommitted
Update Readme with syntax for usage with tagged templates
1 parent d1b9683 commit 8731b5a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,38 @@ module.exports = {
9393
};
9494
```
9595

96+
### Tagged Template Usage / Migrating from `htmlbars-inline-precompile`
97+
98+
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)
99+
100+
This will require an update to the imports of the `hbs` helper in your tests:
101+
102+
Prior syntax:
103+
104+
```
105+
import hbs from 'htmlbars-inline-precompile';
106+
107+
...
108+
109+
await render(hbs`
110+
<MyComponent />
111+
`);
112+
```
113+
114+
New syntax:
115+
116+
```
117+
import { hbs } from 'ember-cli-htmlbars';
118+
119+
...
120+
121+
await render(hbs`
122+
<MyComponent />
123+
`);
124+
```
125+
126+
There is a [codemod](https://github.com/ember-codemods/ember-cli-htmlbars-inline-precompile-codemod) available to automate this change.
127+
96128
### Handlebars 2.0 Support (Ember < 1.10)
97129

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

0 commit comments

Comments
 (0)