forked from san650/ember-cli-page-object
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (32 loc) · 763 Bytes
/
index.js
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
29
30
31
32
33
34
35
36
37
38
39
40
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-page-object',
options: {
nodeAssets: {
ceibo: function() {
return {
enabled: this._shouldIncludeFiles(),
import: ['index.js']
};
}
}
},
included: function(app) {
// see: https://github.com/ember-cli/ember-cli/issues/3718
if (typeof app.import !== 'function' && app.app) {
app = app.app;
}
this.app = app;
this._super.included.apply(this, arguments);
},
treeFor: function(/*name*/) {
if (!this._shouldIncludeFiles()) {
return;
}
return this._super.treeFor.apply(this, arguments);
},
_shouldIncludeFiles: function() {
return this.app.env !== 'production';
}
};