-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (29 loc) · 1.08 KB
/
Copy pathindex.js
File metadata and controls
34 lines (29 loc) · 1.08 KB
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
/* jshint node: true */
'use strict';
var path = require('path'),
fs = require('fs'), self = {},
appRef;
module.exports = {
name: 'emberfied',
treeFor: function (type) {
var pkgPath = path.join(process.cwd(), 'package.json'),
pkg = JSON.parse(fs.readFileSync(pkgPath, { encoding: 'utf-8' })),
env = process.env.EMBER_ENV || 'development';
if (env === 'production') {
if (pkg.includeDevDepsAddonInProdBuild === true) {
return this._super.treeFor.apply(this, [type]);
}
} else {
return this._super.treeFor.apply(this, [type]);
}
},
included: function(app) {
var modulePath;
modulePath = path.relative(app.project.root, __dirname);
app.options.sassOptions = app.options.sassOptions || {};
app.options.sassOptions.includePaths = app.options.sassOptions.includePaths || [];
console.log(path.join(modulePath, 'addon', 'styles'));
app.options.sassOptions.includePaths.push(path.join(modulePath, 'addon', 'styles'));
this._super.included(app);
},
};