File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ ember-jquery
2
2
==============================================================================
3
3
4
4
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.
7
10
8
11
9
12
Compatibility
@@ -21,7 +24,7 @@ Installation
21
24
ember install @ember/jquery
22
25
```
23
26
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 :
25
28
26
29
``` bash
27
30
ember install @ember/optional-features
Original file line number Diff line number Diff line change @@ -41,6 +41,22 @@ module.exports = function() {
41
41
}
42
42
}
43
43
} ,
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
+ } ,
44
60
{
45
61
name : 'ember-release' ,
46
62
npm : {
Original file line number Diff line number Diff line change @@ -10,24 +10,23 @@ module.exports = {
10
10
const VersionChecker = require ( 'ember-cli-version-checker' ) ;
11
11
12
12
let app = this . _findHost ( ) ;
13
- let optionalFeatures = app . project . findAddonByName ( "@ember/optional-features" ) ;
14
-
13
+
15
14
if ( ! app . vendorFiles || ! app . vendorFiles [ 'jquery.js' ] ) {
16
15
app . import ( 'vendor/jquery/jquery.js' , { prepend : true } ) ;
17
16
}
18
17
19
18
app . import ( 'vendor/shims/jquery.js' ) ;
20
19
20
+ let optionalFeatures = app . project . findAddonByName ( "@ember/optional-features" ) ;
21
+ let integrationTurnedOff = optionalFeatures && ! optionalFeatures . isFeatureEnabled ( 'jquery-integration' ) ;
22
+
21
23
let checker = new VersionChecker ( this ) ;
22
24
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 ) {
25
27
app . import ( 'vendor/jquery/component.dollar.js' ) ;
26
28
}
27
29
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
- }
31
30
} ,
32
31
33
32
treeForVendor : function ( tree ) {
You can’t perform that action at this time.
0 commit comments