From cd2049704cfdd584db0efdc2833bd2bea811ae47 Mon Sep 17 00:00:00 2001 From: Jakub Olek Date: Thu, 18 Oct 2018 10:39:04 +0200 Subject: [PATCH 1/2] These are enabled by default in Ember CLI 3.5 --- src/presets/octane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/presets/octane.js b/src/presets/octane.js index 2790786..0d2cc23 100644 --- a/src/presets/octane.js +++ b/src/presets/octane.js @@ -1,7 +1,7 @@ module.exports = { type: 'app', addons: ['ember-decorators', 'sparkles-component', 'sparkles-decorators', 'ember-auto-import'], - experiments: ['MODULE_UNIFICATION', 'BROCCOLI_2', 'SYSTEM_TEMP'], + experiments: ['MODULE_UNIFICATION'], features: ['template-only-glimmer-components'], welcome: false }; From 6a2e2b486d4212b3b8ef09ee0ec242090fb9212d Mon Sep 17 00:00:00 2001 From: hakubo Date: Thu, 18 Oct 2018 20:26:55 +0200 Subject: [PATCH 2/2] (Broken) Check for Ember-cli version --- package.json | 1 + src/presets/octane.js | 13 ++++++++++++- yarn.lock | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7ed7015..5ad4385 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "chalk": "^2.4.1", "cliui": "^4.1.0", "commander": "^2.17.0", + "ember-cli-version-checker": "^2.1.2", "ember-source-channel-url": "^1.1.0", "execa": "^0.10.0", "inquirer": "^6.0.0", diff --git a/src/presets/octane.js b/src/presets/octane.js index 0d2cc23..eb77a1d 100644 --- a/src/presets/octane.js +++ b/src/presets/octane.js @@ -1,7 +1,18 @@ +let VersionChecker = require('ember-cli-version-checker'); +let checker = new VersionChecker(this); +let emberCliVersion = checker.for('ember-cli'); +let experiments; + +if (emberCliVersion.gte('3.5.0')) { + experiments = ['MODULE_UNIFICATION']; +} else { + experiments = ['MODULE_UNIFICATION', 'BROCCOLI_2', 'SYSTEM_TEMP'] +}; + module.exports = { type: 'app', addons: ['ember-decorators', 'sparkles-component', 'sparkles-decorators', 'ember-auto-import'], - experiments: ['MODULE_UNIFICATION'], + experiments: experiments, features: ['template-only-glimmer-components'], welcome: false }; diff --git a/yarn.lock b/yarn.lock index 1b00718..cd21d7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -394,7 +394,7 @@ elegant-spinner@^1.0.1: resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= -ember-cli-version-checker@^2.1.0: +ember-cli-version-checker@^2.1.0, ember-cli-version-checker@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ember-cli-version-checker/-/ember-cli-version-checker-2.1.2.tgz#305ce102390c66e4e0f1432dea9dc5c7c19fed98" integrity sha512-sjkHGr4IGXnO3EUcY21380Xo9Qf6bC8HWH4D62bVnrQop/8uha5XgMQRoAflMCeH6suMrezQL287JUoYc2smEw==