2017-09-22 13:51:03 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
2017-02-03 03:10:41 -05:00
|
|
|
|
2017-05-16 18:48:57 -04:00
|
|
|
module.exports = {
|
|
|
|
// build everything and generate bundles
|
|
|
|
'all': (gulp) => (done) => execBuild(done),
|
|
|
|
// same as all without the bundling part - faster / lower memory usage
|
|
|
|
'no-bundle': (gulp) => (done) => execBuild(done, '--bundle=false'),
|
|
|
|
};
|
|
|
|
|
|
|
|
function execBuild(done, args = '') {
|
2017-02-03 03:10:41 -05:00
|
|
|
const path = require('path');
|
|
|
|
const childProcess = require('child_process');
|
2017-04-14 12:03:57 -04:00
|
|
|
// increase maxbuffer to address out of memory exception when running certain tasks
|
2017-05-16 18:48:57 -04:00
|
|
|
childProcess.exec(path.join(__dirname, `../../build.sh ${args}`), {maxBuffer: 300 * 1024}, done);
|
|
|
|
}
|