forked from nickschot/ember-model-select
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (22 loc) · 721 Bytes
/
Copy pathindex.js
File metadata and controls
28 lines (22 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';
module.exports = {
name: require('./package').name,
included() {
let app = this._findHost();
if (!app.__emberModelSelectIncludedInvoked) {
app.__emberModelSelectIncludedInvoked = true;
this._super.included.apply(this, arguments);
let hasSass = !!app.registry.availablePlugins['ember-cli-sass'];
// Don't include the precompiled css file if the user uses a supported CSS preprocessor
if (!hasSass) {
app.import('vendor/ember-model-select.css');
}
}
},
contentFor(type, config) {
let emberPowerSelect = this.addons.find(
(a) => a.name === 'ember-power-select'
);
return emberPowerSelect.contentFor(type, config);
},
};