Sha256: d861797fdaccfce1012b166f681fbda7032126c59d0020b5c4b087b7ed5b29cf
Contents?: true
Size: 752 Bytes
Versions: 7
Compression:
Stored size: 752 Bytes
Contents
#!/usr/bin/env node var mdeps = require('../'); var subarg = require('subarg'); var fs = require('fs'); var path = require('path'); var argv = subarg(process.argv.slice(2), { alias: { h: 'help', t: 'transform', g: 'globalTransform' } }); if (argv.help) return usage(0); var JSONStream = require('JSONStream'); var files = argv._.map(function (file) { if (file === '-') return process.stdin; return path.resolve(file); }); 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'); r.pipe(process.stdout); if (code) r.on('end', function () { process.exit(code) }); }
Version data entries
7 entries across 7 versions & 2 rubygems