From 30e4a3b605fde2720fad0bb0ee72b284689bc7d1 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 | 10 ++++++++++ 2 files changed, 12 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..05581e7 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,16 @@ module.exports = { let emberVersion = checker.forEmber(); this.shouldPolyfill = emberVersion.lt('3.4.0-alpha.1'); + + let parentChecker = new VersionChecker(this.parent); + let precompileVersion = parentChecker.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) {