summaryrefslogtreecommitdiff
path: root/support/build/aggregate-build.js
blob: b3f04c585375a4df2f751ce30934bed7175aca4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const {rollup} = require('rollup');

module.exports = function buildBundle(options, cb) {
    const {format, entriesPath, outfile} = options;
    return rollup({
        entry: entriesPath + '/index.js'
    })
    .then(function ( bundle ) {
        return bundle.write({
            format,
            moduleName: 'async',
            dest: outfile
        });
    })
    .then(() => cb())
    .catch(cb);
}