Skip to content

add a simple config file parser#68

Merged
isonno merged 1 commit intomasterfrom
jrb/config-file
Aug 5, 2013
Merged

add a simple config file parser#68
isonno merged 1 commit intomasterfrom
jrb/config-file

Conversation

@joelrbrandt
Copy link
Copy Markdown
Contributor

Adds a simple config file parser. Config files are JSON files (or js files that export a single object) of the following format:

{
    "generator-plugin-name-1" : {
        "option-1" : true,
        "option-2" : false
    },
    "generator-plugin-name-2" : {
        "option-3" : { "hoo" : "hah" },
        "option-4" : 42
    }  
}

Config files can be in either the user's home directory or the current working directory. They can have the name "generator.json", "generator.js", ".generator.json", or ".generator.js". All found config files are merged. Files in the current working directory take precedence.

The config options for a plugin are passed as a second argument to the init call

@ghost ghost assigned isonno Aug 5, 2013
isonno pushed a commit that referenced this pull request Aug 5, 2013
@isonno isonno merged commit 12d4f80 into master Aug 5, 2013
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