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

Respect quiet option in Node API #2268

Merged
merged 2 commits into from
Mar 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/node-sass
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ function run(options, emitter) {
*/
function renderFile(file, options, emitter) {
options = getOptions([path.resolve(file)], options);
if (options.watch) {
emitter.emit('warn', util.format('=> changed: %s', file));
if (options.watch && !options.quiet) {
emitter.emit('info', util.format('=> changed: %s', file));
}
render(options, emitter);
}
Expand All @@ -355,7 +355,9 @@ function renderDir(options, emitter) {
renderFile(subject, options, emitter);
}, function(successful, arr) {
var outputDir = path.join(process.cwd(), options.output);
emitter.emit('warn', util.format('Wrote %s CSS files to %s', arr.length, outputDir));
if (!options.quiet) {
emitter.emit('info', util.format('Wrote %s CSS files to %s', arr.length, outputDir));
}
process.exit();
});
});
Expand Down