forked from rwjblue/ember-cli-ember-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
43 lines (35 loc) · 912 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
41
42
43
'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;
var options = {
exports: {
'ember-data': [
'default'
]
}
};
if (this.app.env === 'production') {
this.app.import('vendor/ember-data/ember-data.prod.js', { exports: modules });
} else {
this.app.import('vendor/ember-data/ember-data.js', { exports: modules });
}
};
module.exports = EmberCLIED;