You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
356 B

4 years ago
  1. #!/usr/bin/env node
  2. 'use strict';
  3. var looseEnvify = require('./');
  4. var fs = require('fs');
  5. if (process.argv[2]) {
  6. fs.createReadStream(process.argv[2], {encoding: 'utf8'})
  7. .pipe(looseEnvify(process.argv[2]))
  8. .pipe(process.stdout);
  9. } else {
  10. process.stdin.resume()
  11. process.stdin
  12. .pipe(looseEnvify(__filename))
  13. .pipe(process.stdout);
  14. }