-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-cli-build.js
59 lines (53 loc) · 1.77 KB
/
ember-cli-build.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*jshint node:true*/
/* global require, module */
var BabelTranspiler = require('broccoli-babel-transpiler');
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// See https://github.com/ember-cli/ember-cli-preprocessor-registry/issues/8#issuecomment-281373733
minifyCSS: {
options: { processImport: false },
},
minifyJS: {
enabled: false,
},
sassOptions: { includePaths: ['bower_components'] },
});
app.import(app.bowerDirectory + '/mapbox.js/mapbox.js');
app.import(app.bowerDirectory + '/mapbox.js/mapbox.css');
var faTree = new Funnel(app.bowerDirectory + '/font-awesome/fonts', {
srcDir: '/',
include: ['*.*'],
destDir: '/assets/fonts',
});
var mapboxTree = new Funnel(app.bowerDirectory + '/mapbox.js/images', {
srcDir: '/',
include: ['*.*'],
destDir: '/assets/images',
});
// [FUTURE] upgrade to Ember 2.15 for native support using app.import to import files
// from node_modules directly
var cookieConsentTree = new Funnel(app.project.root + '/node_modules/cookieconsent/build', {
srcDir: '/',
include: ['*.css'],
destDir: '/assets/css',
});
var mp3EncoderTree = new Funnel(app.project.root + '/node_modules/lamejs', {
srcDir: '/',
include: ['lame.min.js'],
destDir: '/workers/encoders',
});
var webworkersTree = new Funnel(
new BabelTranspiler(app.project.root + '/app/workers', { browserPolyfill: true }),
{
srcDir: '/',
include: ['*'],
destDir: '/workers',
}
);
return app.toTree(
mergeTrees([faTree, mapboxTree, cookieConsentTree, mp3EncoderTree, webworkersTree])
);
};