blob: 48aa6ecc477dbe0548e19891bfb62a904dc87384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var path = require('path');
var brfs = require('brfs');
module.exports = function(file) {
var fromFile = file && file !== '-';
var rs = fromFile ? fs.createReadStream(file) : process.stdin;
var fpath = fromFile ? file : path.join(process.cwd(), '-');
return rs.pipe(brfs(fpath));
};
if (!module.parent) module.exports(process.argv[2]).pipe(process.stdout);
|