Skip to content

Commit b2b5401

Browse files
authored
Merge pull request #148 from lupestro/remove-deprecation-message
Now suppressing component-dollar rather than raising a deprecation.
2 parents aee1bc8 + bf89f08 commit b2b5401

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ ember-jquery
22
==============================================================================
33

44
Ember has been historically coupled to jQuery. As part of
5-
[RFC294](https://github.com/emberjs/rfcs/blob/master/text/0294-optional-jquery.md#introduce-emberjquery-package)
6-
jQuery has been made optional and this addon will explicitly add the jQuery integration functionality.
5+
[RFC294](https://github.com/emberjs/rfcs/blob/master/text/0294-optional-jquery.md#introduce-emberjquery-package),
6+
jQuery has been made optional.
7+
8+
This addon makes jQuery available in an Ember project. It also provides the mechanism that implements jQuery
9+
integration when that feature is enabled.
710

811

912
Compatibility
@@ -21,7 +24,7 @@ Installation
2124
ember install @ember/jquery
2225
```
2326

24-
You should also explicitly tell Ember to enable its jQuery integration:
27+
If you also wish to enable Ember's jQuery integration, you must do so explicitly:
2528

2629
```bash
2730
ember install @ember/optional-features

config/ember-try.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ module.exports = function() {
4141
}
4242
}
4343
},
44+
{
45+
name: 'ember-lts-3.8',
46+
npm: {
47+
devDependencies: {
48+
'ember-source': '~3.8.0'
49+
}
50+
}
51+
},
52+
{
53+
name: 'ember-lts-3.12',
54+
npm: {
55+
devDependencies: {
56+
'ember-source': '~3.12.0'
57+
}
58+
}
59+
},
4460
{
4561
name: 'ember-release',
4662
npm: {

index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,23 @@ module.exports = {
1010
const VersionChecker = require('ember-cli-version-checker');
1111

1212
let app = this._findHost();
13-
let optionalFeatures = app.project.findAddonByName("@ember/optional-features");
14-
13+
1514
if (!app.vendorFiles || !app.vendorFiles['jquery.js']) {
1615
app.import('vendor/jquery/jquery.js', { prepend: true });
1716
}
1817

1918
app.import('vendor/shims/jquery.js');
2019

20+
let optionalFeatures = app.project.findAddonByName("@ember/optional-features");
21+
let integrationTurnedOff = optionalFeatures && !optionalFeatures.isFeatureEnabled('jquery-integration');
22+
2123
let checker = new VersionChecker(this);
2224
let ember = checker.forEmber();
23-
24-
if (ember.gte(EMBER_VERSION_WITH_JQUERY_DEPRECATION)) {
25+
26+
if (ember.gte(EMBER_VERSION_WITH_JQUERY_DEPRECATION) && !integrationTurnedOff) {
2527
app.import('vendor/jquery/component.dollar.js');
2628
}
2729

28-
if (optionalFeatures && !optionalFeatures.isFeatureEnabled('jquery-integration')) {
29-
app.project.ui.writeDeprecateLine('You have disabled the `jquery-integration` optional feature. You now have to delete `@ember/jquery` from your package.json');
30-
}
3130
},
3231

3332
treeForVendor: function(tree) {

0 commit comments

Comments
 (0)