From 8731b5a8fe67cb1310886f052229a1dfca20bb16 Mon Sep 17 00:00:00 2001 From: John Ratcliff <4037898+thec0keman@users.noreply.github.com> Date: Wed, 30 Oct 2019 07:58:34 -0700 Subject: [PATCH] Update Readme with syntax for usage with tagged templates --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 0d86dcaa..fa84a2e0 100644 --- a/README.md +++ b/README.md @@ -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` + +`); +``` + +New syntax: + +``` +import { hbs } from 'ember-cli-htmlbars'; + +... + +await render(hbs` + +`); +``` + +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