From 2af1d71528c503d9f22242e1eea71567c1118042 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Thu, 28 Jul 2022 12:42:54 -0400 Subject: [PATCH] fix: switch to ember-cli-htmlbars --- docs/ember/testing.md | 4 ++-- docs/ts/current-limitations.md | 12 ++++++------ tests/integration/components/js-importing-ts-test.js | 2 +- tests/integration/components/ts-component-test.js | 2 +- ts/blueprints/ember-cli-typescript/index.js | 2 +- ts/tests/blueprints/ember-cli-typescript-test.ts | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/ember/testing.md b/docs/ember/testing.md index 8a1e66a7d..dc74ba335 100644 --- a/docs/ember/testing.md +++ b/docs/ember/testing.md @@ -215,7 +215,7 @@ Now, with that setup out of the way, let’s get back to talking about the text import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; +import { hbs } from 'ember-cli-htmlbars'; import User from 'app/types/user'; @@ -283,7 +283,7 @@ Putting it all together, this is what our updated test definition would look lik import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, TestContext } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; +import { hbs } from 'ember-cli-htmlbars'; import User from 'app/types/user'; diff --git a/docs/ts/current-limitations.md b/docs/ts/current-limitations.md index a4ec398e8..7749e950e 100644 --- a/docs/ts/current-limitations.md +++ b/docs/ts/current-limitations.md @@ -16,18 +16,18 @@ Addons need to import templates from the associated `.hbs` file to bind to the l ```ts declare module '\*/template' { - import { TemplateFactory } from 'htmlbars-inline-precompile'; + import { TemplateFactory } from 'ember-cli-htmlbars'; const template: TemplateFactory; export default template; } declare module 'app/templates/\*' { - import { TemplateFactory } from 'htmlbars-inline-precompile'; + import { TemplateFactory } from 'ember-cli-htmlbars'; const template: TemplateFactory; export default template; } declare module 'addon/templates/\*' { - import { TemplateFactory } from 'htmlbars-inline-precompile'; + import { TemplateFactory } from 'ember-cli-htmlbars'; const template: TemplateFactory; export default template; } ``` @@ -42,14 +42,14 @@ import { action } from '@ember/object'; export default class MyGame extends Component { @action turnWheel(degrees: number) { - // ... + // ... } -} +} ``` ```hbs ``` diff --git a/tests/integration/components/js-importing-ts-test.js b/tests/integration/components/js-importing-ts-test.js index 8ba2c9013..fdb6d9ecc 100644 --- a/tests/integration/components/js-importing-ts-test.js +++ b/tests/integration/components/js-importing-ts-test.js @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; +import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | js importing ts', function (hooks) { setupRenderingTest(hooks); diff --git a/tests/integration/components/ts-component-test.js b/tests/integration/components/ts-component-test.js index efc6eb8c2..b1499fc0f 100644 --- a/tests/integration/components/ts-component-test.js +++ b/tests/integration/components/ts-component-test.js @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; +import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | ts component', function (hooks) { setupRenderingTest(hooks); diff --git a/ts/blueprints/ember-cli-typescript/index.js b/ts/blueprints/ember-cli-typescript/index.js index 1a3192a28..f55ec468b 100644 --- a/ts/blueprints/ember-cli-typescript/index.js +++ b/ts/blueprints/ember-cli-typescript/index.js @@ -22,7 +22,7 @@ export {};`; function buildTemplateDeclarations(projectName, layout) { const comment = '// Types for compiled templates'; const moduleBody = ` - import { TemplateFactory } from 'htmlbars-inline-precompile'; + import { TemplateFactory } from 'ember-cli-htmlbars'; const tmpl: TemplateFactory; export default tmpl; `; diff --git a/ts/tests/blueprints/ember-cli-typescript-test.ts b/ts/tests/blueprints/ember-cli-typescript-test.ts index e08954bcc..cf819513d 100644 --- a/ts/tests/blueprints/ember-cli-typescript-test.ts +++ b/ts/tests/blueprints/ember-cli-typescript-test.ts @@ -148,7 +148,7 @@ describe('Acceptance: ember-cli-typescript generator', function () { const globalTypes = file('types/global.d.ts'); expect(globalTypes).to.exist; expect(globalTypes).to.include("declare module 'my-addon/templates/*'").to.include(` - import { TemplateFactory } from 'htmlbars-inline-precompile'; + import { TemplateFactory } from 'ember-cli-htmlbars'; const tmpl: TemplateFactory; export default tmpl; `);