Skip to content

Commit

Permalink
Merge pull request pugjs#1758 from jadejs/stdin
Browse files Browse the repository at this point in the history
Use `-` as file name when using stdin input
  • Loading branch information
ForbesLindesay committed Dec 1, 2014
2 parents 20bf2f6 + 9bc3d00 commit a7b711f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/jade.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ if (files.length) {

function stdin() {
var buf = '';
options.filename = '-';
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk){ buf += chunk; });
process.stdin.on('end', function(){
Expand Down

0 comments on commit a7b711f

Please sign in to comment.