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

Adds support for #82's conclusion. #85

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

legodude17
Copy link

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.

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.
@legodude17
Copy link
Author

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))
Copy link
Author

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.

@jedahan
Copy link

jedahan commented Jun 20, 2018

@dominictarr if I updated this PR would you be amicable to merging?

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

Successfully merging this pull request may close these issues.

2 participants