Open bsuh opened 8 years ago
It doesn't really make sense to use globify and output to stdout, since the whole purpose of globify is to output multiple bundles. Can you elaborate on your use-case?
I just need the first feature, Windows glob support.
Ah, ok. That's totally valid. Thanks for the clarification.
I've always used the --outfile
argument, so I've never tested writing to stdout before. But you're right; it should be supported, and the console.log()
statement interferes with that. I think the best fix is to wrap the console.log()
statement in an if
condition, based on whether the --outfile
argument is present. If it's not present, then we can assume that the user intends to output to stdout, so we shouldn't log anything else.
Thanks. Your fix sounds good. Sorry if I came off as caustic in the first comment. Working with browserify and co on Windows has been problematic and I spent that day looking at more fun issues with Windows like __dirname being /foo\bar\ and such :grimacing:
Ran across this issue today, the console.log breaks stdout when piping to other tools that expect a Browserify bundle piped into them.
https://github.com/BigstickCarpet/globify/blob/master/lib/index.js#L49
Why is this here? It makes outputting to stdout instead of using --outfile useless because stdout contains a command before the browserify output.