-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove most of the unnecessary left-overs
- Loading branch information
1 parent
2b80ba4
commit ed8c46a
Showing
13 changed files
with
3 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,5 @@ | ||
'use strict'; | ||
|
||
const VersionChecker = require('ember-cli-version-checker'); | ||
const Funnel = require('broccoli-funnel'); | ||
|
||
module.exports = { | ||
name: require('./package').name, | ||
|
||
included(...args) { | ||
this._super.included.apply(this, args); | ||
|
||
const checker = new VersionChecker(this.project); | ||
const ember = checker.forEmber(); | ||
|
||
this.hasNativeOnModifier = ember.gte('3.11.0-beta.1'); | ||
|
||
this.hasEventHelpers = Boolean( | ||
this.project.findAddonByName('ember-event-helpers') | ||
); | ||
|
||
if (this.hasNativeOnModifier && this.parent === this.project) { | ||
let message = | ||
'The `{{on}}` modifier is available natively since Ember 3.11.0-beta.1. You can remove `ember-on-helper` from your `package.json`.'; | ||
|
||
if (!this.hasEventHelpers) { | ||
message += | ||
' If you use the `(prevent-default)` helper, please install `ember-event-helpers`.'; | ||
} | ||
|
||
this.ui.writeDeprecateLine(message); | ||
} | ||
}, | ||
|
||
treeForApp(...args) { | ||
return this.filterTree(this._super.treeForApp.apply(this, args)); | ||
}, | ||
|
||
treeForAddon(...args) { | ||
return this.filterTree(this._super.treeForAddon.apply(this, args)); | ||
}, | ||
|
||
filterTree(tree) { | ||
const exclude = []; | ||
|
||
if (this.hasNativeOnModifier) { | ||
exclude.push(/modifiers/); | ||
} | ||
if (this.hasEventHelpers) { | ||
exclude.push(/helpers/); | ||
} | ||
|
||
return new Funnel(tree, { exclude }); | ||
} | ||
name: require('./package').name | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters