From 6c5395dd055b99890daea8e31cc4dfb84af2f139 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 24 Feb 2015 18:22:38 -0500 Subject: [PATCH] added --verbose flag for grunt dev --- Gruntfile.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c1c662bb66..f2ea79c28b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,10 +8,14 @@ var fork = require('child_process').fork, module.exports = function(grunt) { function update(action, filepath, target) { - var args = ['--log-level=info'], + var args = [], fromFile = '', compiling = '', time = Date.now(); + + if (grunt.option('verbose')) { + args.push('--log-level=info'); + } if (target === 'lessUpdated') { fromFile = ['js','tpl']; @@ -39,7 +43,10 @@ module.exports = function(grunt) { worker.on('message', function() { if (incomplete.length) { incomplete = []; - grunt.log.writeln('NodeBB restarted in ' + (Date.now() - time) + ' ms'); + + if (grunt.option('verbose')) { + grunt.log.writeln('NodeBB restarted in ' + (Date.now() - time) + ' ms'); + } } }); }