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

Fix output buffer is imcomplete working in child_process #1834

Merged
merged 9 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
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
11 changes: 2 additions & 9 deletions bin/node-sass
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var Emitter = require('events').EventEmitter,
glob = require('glob'),
sass = require('../lib'),
render = require('../lib/render'),
stdout = require('stdout-stream'),
stdin = require('get-stdin'),
fs = require('fs');

Expand Down Expand Up @@ -160,15 +161,7 @@ function getEmitter() {
}
});

emitter.on('log', function(data) {
console.log(data);
});

emitter.on('done', function() {
if (!options.watch && !options.directory) {
process.exit();
}
});
emitter.on('log', stdout.write.bind(stdout));

return emitter;
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"node-gyp": "^3.3.1",
"npmlog": "^4.0.0",
"request": "^2.61.0",
"sass-graph": "^2.1.1"
"sass-graph": "^2.1.1",
"stdout-stream": "^1.4.0"
},
"devDependencies": {
"coveralls": "^2.11.8",
Expand Down