Skip to content

Node.js based forum software built for the modern web

closes #4520

psychobunny6e617dd69a14
diff --git a/Gruntfile.js b/Gruntfile.js
index a6aca2083a..b9422b7661 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,15 +7,16 @@ var fork = require('child_process').fork,
module.exports = function(grunt) {
+ var args = [];
+ if (!grunt.option('verbose')) {
+ args.push('--log-level=info');
+ }
+
function update(action, filepath, target) {
- var args = [],
+ var updateArgs = args,
fromFile = '',
compiling = '',
time = Date.now();
-
- if (!grunt.option('verbose')) {
- args.push('--log-level=info');
- }
if (target === 'lessUpdated_Client') {
fromFile = ['js', 'tpl', 'acpLess'];
@@ -37,11 +38,11 @@ module.exports = function(grunt) {
return incomplete.indexOf(ext) === -1;
});
- args.push('--from-file=' + fromFile.join(','));
+ updateArgs.push('--from-file=' + fromFile.join(','));
incomplete.push(compiling);
worker.kill();
- worker = fork('app.js', args, { env: env });
+ worker = fork('app.js', updateArgs, { env: env });
worker.on('message', function() {
if (incomplete.length) {
@@ -101,6 +102,6 @@ module.exports = function(grunt) {
env.NODE_ENV = 'development';
- worker = fork('app.js', [], { env: env });
+ worker = fork('app.js', args, { env: env });
grunt.event.on('watch', update);
};
\ No newline at end of file