Skip to content

Commit

Permalink
Merge pull request #96 from gmurphey/deprecation-version-fix
Browse files Browse the repository at this point in the history
Skipping deprecation warning if ember-cli is below 2.6
  • Loading branch information
rwjblue authored Sep 28, 2016
2 parents da10d3f + 22cc4c0 commit 6b85a94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
/* jshint node: true */
'use strict';

var VersionChecker = require('ember-cli-version-checker');

module.exports = {
name: 'ember-try',
init: function() {
this._super.init && this._super.init.apply(this, arguments);
if (this.project.pkg.devDependencies && this.project.pkg.devDependencies['ember-try']) {

var checker = new VersionChecker(this);
var cliVersion = checker.for('ember-cli', 'npm');

if (cliVersion.satisfies('>= 2.6.0') && this.project.pkg.devDependencies && this.project.pkg.devDependencies['ember-try']) {
this.ui.writeDeprecateLine('ember-try is now included with ember-cli. Including it in your package.json is unnecessary.');
}
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"core-object": "^1.1.0",
"debug": "^2.2.0",
"ember-cli-babel": "^5.1.3",
"ember-cli-version-checker": "^1.1.6",
"ember-try-config": "^2.0.1",
"extend": "^3.0.0",
"fs-extra": "^0.26.0",
Expand Down

0 comments on commit 6b85a94

Please sign in to comment.