MakeTypes icon indicating copy to clipboard operation
MakeTypes copied to clipboard

Accept multiple files as sample input

Open renatomariscal opened this issue 6 years ago • 5 comments

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.

renatomariscal avatar Aug 30 '18 05:08 renatomariscal

@jvilk Does this looks good? The travis-ci failure reproduces in my machine even for the master branch, perhaps it is currently unbuildable?

renatomariscal avatar Aug 30 '18 20:08 renatomariscal

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.

jvilk avatar Aug 30 '18 21:08 jvilk

I forgot to open my comment by thanking you for this pull request! I was delighted to see it this morning. :-)

jvilk avatar Aug 30 '18 21:08 jvilk

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

renatomariscal avatar Aug 31 '18 00:08 renatomariscal

Hi, @jvilk, any chance of getting this PR merged?

renatomariscal avatar Jun 27 '19 01:06 renatomariscal

Closing since this hasn't gotten attention

renatomariscal avatar Aug 05 '24 23:08 renatomariscal