Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Accept glob string for [entry files] ... #1205
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 |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

...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