Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary console.log #11

Open
bsuh opened this issue Sep 6, 2016 · 5 comments
Open

Unnecessary console.log #11

bsuh opened this issue Sep 6, 2016 · 5 comments
Labels

Comments

@bsuh
Copy link

bsuh commented Sep 6, 2016

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.

@JamesMessinger
Copy link
Member

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?

@bsuh
Copy link
Author

bsuh commented Sep 6, 2016

I just need the first feature, Windows glob support.

Features

  • Supports glob patterns for entry files - even on Windows
  • Optionally create separate browserify bundles for each entry file

@JamesMessinger
Copy link
Member

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.

@bsuh
Copy link
Author

bsuh commented Sep 8, 2016

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 😬

@bcomnes
Copy link

bcomnes commented Jul 24, 2019

Ran across this issue today, the console.log breaks stdout when piping to other tools that expect a Browserify bundle piped into them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants