decide.nolog.cz/ember-cli-build.js

75 lines
2.2 KiB
JavaScript
Raw Normal View History

2015-12-07 20:24:22 +01:00
/*jshint node:true*/
2015-11-20 00:17:15 +01:00
/* global require, module */
2016-03-18 13:01:50 +01:00
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
2015-11-20 00:17:15 +01:00
2016-03-18 13:01:50 +01:00
module.exports = function() {
const Funnel = require('broccoli-funnel');
const unwatchedTree = require('broccoli-unwatched-tree');
2016-03-18 13:01:50 +01:00
const trees = [];
2015-11-20 00:17:15 +01:00
2016-03-18 13:01:50 +01:00
const app = new EmberApp({
babel: {
optional: ['es6.spec.symbols'],
includePolyfill: true
},
2015-11-20 00:17:15 +01:00
'buildInfoOptions': {
'metaTemplate': 'version={SEMVER}'
2016-05-24 01:06:47 +02:00
},
'ember-bootstrap': {
importBootstrapCSS: false
2015-11-20 00:17:15 +01:00
}
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js');
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
2016-06-20 19:28:10 +02:00
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-GB.js');
2016-03-18 13:15:47 +01:00
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js');
2015-11-20 00:17:15 +01:00
app.import({
development: 'bower_components/floatThead/dist/jquery.floatThead.js',
production: 'bower_components/floatThead/dist/jquery.floatThead.min.js'
});
app.import('bower_components/sjcl/sjcl.js', {
using: [
{ transformation: 'amd', as: 'sjcl' }
]
});
2015-11-20 00:17:15 +01:00
app.import('bower_components/jstimezonedetect/jstz.js');
// include api files into dist
trees.push(
new Funnel(unwatchedTree('api'), {
2015-11-20 00:17:15 +01:00
srcDir: '/',
destDir: '/api',
include: ['index.php', 'cron.php', 'config.default.php', 'classes/*', 'utils/**', 'vendor/**']
2015-11-20 00:17:15 +01:00
})
);
if (app.env === 'development' || app.env === 'test') {
trees.push(
new Funnel('tests/dummyData', {
2015-11-20 00:17:15 +01:00
srcDir: '/',
destDir: '/data',
include: ['**']
2015-11-20 00:17:15 +01:00
})
);
}
return app.toTree(trees);
2015-11-20 00:17:15 +01:00
};