Support for .js files and multiple files per directory #2

wants to merge 2 commits into


None yet

2 participants

zzack commented Jul 12, 2012

Let me know if there would be a better approach or if this is a bad idea for some reason.

Basically detects if the request file is a js file, and if so requires it and merges it (with deepmerge).

Also pushes files onto configFiles array, as to not return from for loop, thereby allowing multiple files per directory.


The configFiles behavior is intentional so that you can have environment branching without merging.

zzack commented Jul 12, 2012

I see, so the pattern I was going for was to have a default config.json provided by the application and then a config.local.json file to override parts of it.

If I understand correctly you would recommend using 1 config.json and then override it in whole by config.DEVELOPMENT.json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment