From 4e147a722a2c2bbc50246aa779a5973d9122565b Mon Sep 17 00:00:00 2001 From: James Herdman Date: Mon, 18 Jun 2018 16:46:32 -0400 Subject: [PATCH] Additional Dependency Warning Resolves #18 --- README.md | 2 ++ index.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index dd9d645..f731456 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ know and love, no longer surrounded by mustaches. \o/ ember install ember-angle-bracket-invocation-polyfill ``` +You will additionally need to ensure ember-cli-htmlbars-inline-precompile is at least version 1.0.3. + ## Usage The best usage guide is [the RFC itself](https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md), diff --git a/index.js b/index.js index 2957447..8dda6ea 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,13 @@ module.exports = { let emberVersion = checker.forEmber(); this.shouldPolyfill = emberVersion.lt('3.4.0-alpha.1'); + + let parentChecker = new VersionChecker(this.parent); + let precompileVersion = checker.for('ember-cli-htmlbars-inline-precompile'); + + if (precompileVersion.exists() && precompileVersion.lt('1.0.3')) { + this.ui.writeWarnLine('Detected a version of ember-cli-htmlbars-inline-precompile that does not support angle bracket invocation, please update to at least 1.0.3.'); + } }, setupPreprocessorRegistry(type, registry) {