Skip to content

Commit

Permalink
fix module-deps bin
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jul 20, 2014
1 parent 940784c commit a23c204
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/cmd.js
Expand Up @@ -11,14 +11,15 @@ if (argv.help) return usage(0);

var JSONStream = require('JSONStream');

var stringify = JSONStream.stringify();
stringify.pipe(process.stdout);

var files = argv._.map(function (file) {
if (file === '-') return process.stdin;
return path.resolve(file);
});
mdeps(files, argv).pipe(stringify);
var md = mdeps(argv);
md.pipe(JSONStream.stringify()).pipe(process.stdout);

files.forEach(function (file) { md.write(file) });
md.end();

function usage (code) {
var r = fs.createReadStream(__dirname + '/usage.txt');
Expand Down

0 comments on commit a23c204

Please sign in to comment.