decide.nolog.cz/Brocfile.js

95 lines
2.8 KiB
JavaScript
Raw Normal View History

2014-10-30 21:44:22 +01:00
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var pickFiles = require('broccoli-static-compiler');
2015-08-01 22:14:26 +02:00
var unwatchedTree = require('broccoli-unwatched-tree');
2015-04-04 01:33:42 +02:00
var trees = [];
2014-10-30 21:44:22 +01:00
2014-11-01 18:00:46 +01:00
var app = new EmberApp({
'buildInfoOptions': {
'metaTemplate': 'version={DESC}'
},
2014-11-01 18:00:46 +01:00
// do not fingerprint webshim
'fingerprint': {
'exclude': ['assets/shims']
2014-11-01 18:00:46 +01:00
}
});
2014-10-30 21:44:22 +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({
development: 'bower_components/bootstrap/dist/js/bootstrap.js',
production: 'bower_components/bootstrap/dist/js/bootstrap.min.js'
});
2014-11-01 18:00:46 +01:00
app.import({
development: 'bower_components/bootstrap/dist/css/bootstrap.css',
production: 'bower_components/bootstrap/dist/css/bootstrap.min.css'
});
2015-04-04 01:39:28 +02:00
if (app.env === 'development' || app.env === 'test') {
2014-11-01 18:00:46 +01:00
app.import('bower_components/bootstrap/dist/css/bootstrap.css.map', {
destDir: 'assets'
});
}
// include bootstrap fonts in dist
2015-04-04 01:33:42 +02:00
trees.push(
pickFiles('bower_components/bootstrap/dist/fonts', {
srcDir: '/',
destDir: '/fonts'
})
);
2014-10-30 21:44:22 +01:00
app.import('bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js');
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
2014-10-30 21:44:22 +01:00
app.import('bower_components/ember-i18n/lib/i18n.js');
app.import('bower_components/ember-i18n/lib/i18n-plurals.js');
app.import({
development: 'bower_components/floatThead/dist/jquery.floatThead.js',
production: 'bower_components/floatThead/dist/jquery.floatThead.min.js'
});
app.import({
development: 'bower_components/webshim/js-webshim/dev/polyfiller.js',
production: 'bower_components/webshim/js-webshim/minified/polyfiller.js'
});
app.import('bower_components/sjcl/sjcl.js');
app.import('bower_components/modernizr/modernizr.js');
app.import('bower_components/jstimezonedetect/jstz.js');
// include webshim files into dist
2015-04-04 01:33:42 +02:00
trees.push(
pickFiles('bower_components/webshim/js-webshim/minified/shims', {
srcDir: '/',
destDir: '/assets/shims'
})
);
2014-10-30 21:44:22 +01:00
2015-07-31 23:26:46 +02:00
// include api files into dist
trees.push(
2015-08-01 22:14:26 +02:00
pickFiles(unwatchedTree('api'), {
2015-07-31 23:26:46 +02:00
srcDir: '/',
destDir: '/api',
files: ['index.php', 'cron.php', 'classes/*', 'vendor/*']
2015-07-31 23:26:46 +02:00
})
);
2015-04-04 01:33:42 +02:00
trees.push(app.toTree());
var mergeTrees = require('broccoli-merge-trees');
2015-04-04 01:33:42 +02:00
module.exports = mergeTrees(trees);