Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 4a858f1

Browse files
committedApr 24, 2018
Respect quiet option in Node API
This is an extension of #2268. Catches a few places missed the first time around.
1 parent 8004d10 commit 4a858f1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎bin/node-sass

+6
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ function getEmitter() {
161161
}
162162
});
163163

164+
emitter.on('info', function(data) {
165+
if (!options.quiet) {
166+
console.info(data);
167+
}
168+
});
169+
164170
emitter.on('log', stdout.write.bind(stdout));
165171

166172
return emitter;

‎lib/render.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.exports = function(options, emitter) {
6464
return done();
6565
}
6666

67-
emitter.emit('warn', chalk.green('Rendering Complete, saving .css file...'));
67+
emitter.emit('info', chalk.green('Rendering Complete, saving .css file...'));
6868

6969
mkdirp(path.dirname(destination), function(err) {
7070
if (err) {
@@ -76,7 +76,7 @@ module.exports = function(options, emitter) {
7676
return emitter.emit('error', chalk.red(err));
7777
}
7878

79-
emitter.emit('warn', chalk.green('Wrote CSS to ' + destination));
79+
emitter.emit('info', chalk.green('Wrote CSS to ' + destination));
8080
emitter.emit('write', err, destination, result.css.toString());
8181
done();
8282
});
@@ -94,7 +94,7 @@ module.exports = function(options, emitter) {
9494
return emitter.emit('error', chalk.red('Error' + err));
9595
}
9696

97-
emitter.emit('warn', chalk.green('Wrote Source Map to ' + sourceMap));
97+
emitter.emit('info', chalk.green('Wrote Source Map to ' + sourceMap));
9898
emitter.emit('write-source-map', err, sourceMap, result.map);
9999
done();
100100
});

0 commit comments

Comments
 (0)
This repository has been archived.