MakeTypes
MakeTypes copied to clipboard
Accept multiple files as sample input
Implementation for https://github.com/jvilk/MakeTypes/issues/10
This code allows multiple input, making the following input to work:
# Original functionality still working as before, accepting a json array or object
make_types [optons] input.json rootName
# Multiple explicit json objects
make_types foo1.json foo2.json bar.json rootName
# Multiple wildcard json objects
make_types foo*.json rootName
# Multiple wildcard and explicit json objects
make_types foo*.json bar.json rootName
Let me know if it works, sounds good, if you want to have something changed or added.
@jvilk Does this looks good? The travis-ci failure reproduces in my machine even for the master branch, perhaps it is currently unbuildable?
Is the dependency on glob
needed? Doesn't the terminal automatically expand wildcards? Or is this not true on some platforms?
For example, try running the following Node program:
console.log(process.argv);
...in a file full of files with node file.js *
or node file.js *.js
. On my Mac, it prints a full listing of files.
If the terminal does this on other platforms, then I'd like to drop the dependency on glob
to keep things simple.
I forgot to open my comment by thanking you for this pull request! I was delighted to see it this morning. :-)
@jvilk You are right, I tested in Mac (zsh, bash, sh) and linux (bash), in all of these the expansion happens before getting into node. So I removed it in the last commit.
Hi, @jvilk, any chance of getting this PR merged?
Closing since this hasn't gotten attention