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
Accept glob string for [entry files] ... #1205
base: master
Are you sure you want to change the base?
Conversation
…les] {OPTIONS}" Windows does not auto expand globs on the command line
I'm reviewing |
I think something similar the following would be prefered: [].concat(opts.entries).filter(Boolean).reduce(function (globbed, input) {
return globbed.concat(glob.sync(input));
}, []).forEach(function (file) {
self.add(file, { basedir: opts.basedir });
}); I'd also prefer to isolate globs to being expanded in "bin/args.js", rather than in the library code. |
Ah this would work great in watchify (see browserify/watchify#56). Don't forget to test it with the CLI not just the API 😛 |
@terinjokes Yeah, I see how that fits more in with the current pattern. I just need to spend some more time to understand the current pattern a bit better. I'll try to at least get around copy pasting your suggested change and testing it. @zertosh That issue does not appear to be the same thing. That issue is about NEW files. This issue is about globs simply not working at all (on Windows). Solving this problem in browserify did seem to solve the duplicate problem of globs not working with watchify when I pointed it at my edited repo. |
@chad-autry My is to use the fact that |
I don't know if this should be browserify's responsibility in the API. People can always call Adding a |
@zertosh You wouldn't be able to since Linux systems would still expand the glob before it reached watchify @substack I'll try to re-write it like the other other uses of glob in bin/args.js to not do glob.sync() For my use case I'm calling browserify from an npm script, was unable to call another program to substitute command parameters. |
@chad-autry Not if it's quoted. The use case I see in watchify is to monitor a directory of tests - where each test file needs to be an entry. Watchify would look at Though, now that I think about it some more, this seems like a bad idea since it'll leave API users out in the cold. |
…entry files] {OPTIONS}"" This reverts commit 9ff7c55.
…es] {OPTIONS}" Windows does not auto expand globs on the command line
I've made the logic more consistent with how browserify does things, and moved it over into "bin/args.js" as @terinjokes suggested. |
What is the status of this PR ? Can it be merged ? |
Requires re-review and hopefully acceptance by someone with permission to merge. |
@chad-autry Thank you so much for this patch! You saved my day :) |
Let's have the best globally moving projects. |
Please consider this improvement. It's very useful to run tests. browserify 'test/**/*.spec.js' | tape-run |
...in command "browserify [entry files] {OPTIONS}"
Windows does not auto expand globs on the command line
Creating the pull request to try and progress. It works locally for me, but an automated test case would be awesome. I can't tell how to make such a test case examining the existing suite.
This pull request is for #1170