forked from travis-ci/travis-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-cli-build.js
68 lines (60 loc) · 1.86 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
60
61
62
63
64
65
66
67
68
/* eslint-env node */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var Funnel = require('broccoli-funnel');
module.exports = function () {
var fingerprint;
if (process.env.DISABLE_FINGERPRINTS) {
fingerprint = false;
} else {
fingerprint = {
exclude: ['images/emoji'],
extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg']
};
if (process.env.TRAVIS_ENTERPRISE) {
fingerprint.prepend = '/';
} else {
var assetsHost = process.env.ASSETS_HOST;
if (assetsHost) {
if (assetsHost.substr(-1) !== '/') {
assetsHost = assetsHost + '/';
}
fingerprint.prepend = assetsHost;
} else if (process.env.DEPLOY_TARGET) {
var s3Bucket = require('./config/deploy')(process.env.DEPLOY_TARGET).s3.bucket;
fingerprint.prepend = '//' + s3Bucket + '.s3.amazonaws.com/';
}
}
}
var app = new EmberApp({
babel: {
includePolyfill: true,
optional: ['es7.decorators']
},
fingerprint: fingerprint,
sourcemaps: {
enabled: true,
extensions: ['js']
},
'ember-prism': {
'components': ['scss', 'javascript', 'json'], //needs to be an array, or undefined.
'plugins': ['line-highlight']
},
svg: {
optimize: false,
paths: [
'public/images/stroke-icons',
'public/images/svg'
]
}
});
app.import('bower_components/pusher/dist/pusher.js');
app.import('bower_components/jquery-timeago/jquery.timeago.js');
app.import('bower_components/JavaScript-MD5/js/md5.js');
app.import('bower_components/moment/moment.js');
app.import('bower_components/js-emoji/demo/emoji.css');
app.import('bower_components/js-emoji/lib/emoji.js');
var emojiAssets = new Funnel('bower_components/emoji-data/img-apple-64', {
destDir: '/images/emoji'
});
return app.toTree(emojiAssets);
};