name could be the basename of the configuration file, or a directory name which hold the actual configuration file.
If it a file, it will be searched according this simple rule: .js first, and if not found then .json. If .json also not found, then it simply returns an empty object.
If name is a directory, then it will try to load index.js or index.json accordingly.
On both cases, the .js file needs to return a Promise and have to be wrapped inside a cuk wrapper like this:
dir: directory to search for name. It could be any directory, even outside your project tree. Required.
name: name of configuration file you want to load, without file extension, or a sub directory with a file base named index. Optional. If it left empty, it defaults to: config
This function helper returns a Promise. If an error occurs, it will be silently discarded and returned as an empty object