-
Notifications
You must be signed in to change notification settings - Fork 101
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
Reading from STDIN does not seem to work #64
Comments
Weird. I see the option in |
I've run into an opportunity where this feature would be helpful. I have a non-node application that is processing a Javascript file through module-deps and I have the contents of the module in memory. Probably very much an edge case. |
@ornj I think the big blocker for me is figuring out how to support multiple input files, and how to name them. I'd rather not implement stdin support at all if it's going to be half-baked. Any ideas? |
I haven't really looked into the source very much so my understanding is pretty shallow. Why do they need to be named? What if there is no file on disk? Browserify reads from stdin, browserify/browserify#1201 (comment). Maybe some inspiration can be taken from that? |
@ornj The file needs to be named because that's how modules are identified. browserify does read stdin and gives files a default name of |
I've started to take a look but I'm not a Node dev. I don't have a good environment for debugging Node command line scripts and I'm finding the whole process cumbersome. This doesn't seem like it would be too hard if I could figure out the appropriate place to parse the stream. As far as supporting multiple files, I don't think that's really necessary. Using @jhthorsen example from above, you're concatenating files so in practice you're really only providing a single file. |
👍 |
Have this issue and the pull request gone stale? |
Seems to have gone stale. |
I'm trying to pipe data into module-deps but it fails:
Running module-deps with "robots.js" as input on the other hand works like a charm:
I'm not sure how the output should look when you pipe though... How will it know the path to the entry point? Will it simply have {"file":"-","id":"-",...}
The text was updated successfully, but these errors were encountered: