2016-10-10 03:43:44 +02:00
|
|
|
#!/usr/bin/env node
|
2016-11-03 01:33:53 +01:00
|
|
|
'use strict';
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
var looseEnvify = require('./');
|
|
|
|
var fs = require('fs');
|
|
|
|
|
|
|
|
if (process.argv[2]) {
|
|
|
|
fs.createReadStream(process.argv[2], {encoding: 'utf8'})
|
|
|
|
.pipe(looseEnvify(process.argv[2]))
|
|
|
|
.pipe(process.stdout);
|
|
|
|
} else {
|
|
|
|
process.stdin.resume()
|
|
|
|
process.stdin
|
|
|
|
.pipe(looseEnvify(__filename))
|
|
|
|
.pipe(process.stdout);
|
|
|
|
}
|