Add --threads=# option for setting max threads

Make grunt NODE_ENV development by default
This commit is contained in:
Peter Jaszkowiak
2017-05-23 14:00:37 -06:00
parent 62546bc4fd
commit 2a9cdb7be2
3 changed files with 21 additions and 2 deletions

View File

@@ -180,6 +180,11 @@ function build(targets, callback) {
async.series([
beforeBuild,
function (next) {
var threads = parseInt(nconf.get('threads'), 10);
if (threads) {
require('./minifier').maxThreads = threads - 1;
}
var parallel = !nconf.get('series');
if (parallel) {
winston.info('[build] Building in parallel mode');