-
Notifications
You must be signed in to change notification settings - Fork 97
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
Adds support for #82's conclusion. #85
base: master
Are you sure you want to change the base?
Conversation
This adds support for the file extensions and for parsers by specific extension. All tests pass and a new one was added to test the extensions.
I think that it should be semver-major given that it breaks anyone using a custom parser because now the custom parsers are objects. |
var configs = [defaults] | ||
var configFiles = [] | ||
function addConfigFile (file) { | ||
if (configFiles.indexOf(file) >= 0) return | ||
var fileConfig = cc.file(file) | ||
if (fileConfig) { | ||
configs.push(parse(fileConfig)) | ||
configs.push(cc.parse(fileConfig, file, parsers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of think that the parse function should be created inside the main function. I did it this way so that test/ini.js
still passed.
@dominictarr if I updated this PR would you be amicable to merging? |
This adds support for the file extensions and for parsers by specific extension. All tests pass and a new one was added to test the extensions. This will probably be a major semver change so that was reflected in the package.json. Closes #82.