-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
38 lines (29 loc) · 796 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
'use strict';
var path = require('path');
var fs = require('fs');
function EmberCLIED(project) {
this.project = project;
this.name = 'Ember CLI Ember Data';
}
function unwatchedTree(dir) {
return {
read: function() { return dir; },
cleanup: function() { }
};
}
EmberCLIED.prototype.treeFor = function treeFor(name) {
var treePath = path.join('node_modules/ember-cli-ember-data', name);
if (fs.existsSync(treePath)) {
return unwatchedTree(treePath);
}
};
EmberCLIED.prototype.included = function included(app) {
this.app = app;
if (this.app.env !== 'production') {
this.app.import('vendor/ember-data/data.prod.js');
}
if (this.app.env !== 'development') {
this.app.import('vendor/ember-data/data.js');
}
};
module.exports = EmberCLIED;