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

loadConfig Documentation Parameters Reversed #573

Open
blkmutt opened this issue Aug 6, 2019 · 1 comment
Open

loadConfig Documentation Parameters Reversed #573

blkmutt opened this issue Aug 6, 2019 · 1 comment

Comments

@blkmutt
Copy link

blkmutt commented Aug 6, 2019

In the documentation (https://github.com/infinitered/gluegun/blob/master/docs/toolbox-config.md), parameters appear to be reversed for loadConfig. The samples appear to be as follows:

const myConfig = loadConfig(process.cwd(), brand)

Looking at src/loaders/config-loader.ts, it appears as though the function call is looking for name and then directory.

/**
 * Loads the config for the app via CosmicConfig by searching in a few places.
 *
 * @param name The base name of the config to load.
 * @param src The directory to look in.
 */
export function loadConfig(name: string, src: string)

I could update either the documentation or the code and submit a PR, but would you prefer the documentation remains the same or the code?

@jamonholmgren
Copy link
Member

Hey @blkmutt let's update the documentation -- thank you so much for catching this! I'd probably prefer how it's documented but we've already had it out in the wild with the other order for a while, so we'd better keep it to reduce annoyance/bugs on upgrading.

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

No branches or pull requests

2 participants