Commit 4a858f1e by xzyfer Committed by Michael Mifsud

Respect quiet option in Node API

This is an extension of #2268. Catches a few places missed the
first time around.
parent 8004d107
......@@ -161,6 +161,12 @@ function getEmitter() {
}
});
emitter.on('info', function(data) {
if (!options.quiet) {
console.info(data);
}
});
emitter.on('log', stdout.write.bind(stdout));
return emitter;
......
......@@ -64,7 +64,7 @@ module.exports = function(options, emitter) {
return done();
}
emitter.emit('warn', chalk.green('Rendering Complete, saving .css file...'));
emitter.emit('info', chalk.green('Rendering Complete, saving .css file...'));
mkdirp(path.dirname(destination), function(err) {
if (err) {
......@@ -76,7 +76,7 @@ module.exports = function(options, emitter) {
return emitter.emit('error', chalk.red(err));
}
emitter.emit('warn', chalk.green('Wrote CSS to ' + destination));
emitter.emit('info', chalk.green('Wrote CSS to ' + destination));
emitter.emit('write', err, destination, result.css.toString());
done();
});
......@@ -94,7 +94,7 @@ module.exports = function(options, emitter) {
return emitter.emit('error', chalk.red('Error' + err));
}
emitter.emit('warn', chalk.green('Wrote Source Map to ' + sourceMap));
emitter.emit('info', chalk.green('Wrote Source Map to ' + sourceMap));
emitter.emit('write-source-map', err, sourceMap, result.map);
done();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment