Skip to content
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

Make a pure merge #4

Open
thomaspons opened this issue Apr 3, 2015 · 2 comments
Open

Make a pure merge #4

thomaspons opened this issue Apr 3, 2015 · 2 comments

Comments

@thomaspons
Copy link

Hello,

The doc says :

"This plugin will collect all the json files provided to it, parse them, put them in a dictionary where the keys of that dictionary are the filenames."

It's pretty cool but what do you think to add an option to make pure merge. Like this for example :

file1.json

{
    ENV: {
        name: 'john'
    }
}

file2.json

{
    ENV: {
        email : '[email protected]'
    }
}

generated.json

{
    ENV: {
        name: 'john',
        email : '[email protected]'
    }
}

What do you think about it ?

@reflog
Copy link
Owner

reflog commented Apr 4, 2015

It's a nice idea, but not what the plugin was originally for. I made it to combine a few localization json files into one. But if you find this useful, I am always open to pull requests :)

@robertdunaway
Copy link

I was just about to leave the same comment. I'm switching from grunt to gulp and this seems to be the closest thing I could find to what I was getting with grunt-merge-json.

Maybe this can be done in the optional function? I can't figure out how make do it though. No examples on it and it's requiring some kind of stream back. Sorry if I'm a newbie.

Any advice on how to merge JSON files with Gulp would be greatly appreciated. If you wanted to add this functionality to this utility or show how to create and return my own JSON with the optional function parameter then that will work too.

Thanks,
Bob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants