diff --git a/README.md b/README.md index e1ee050..4d1dd04 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,10 @@ You can specify what strings to match by adding a `strings` key in your engines: fixme: enabled: true - strings: - - FIXME - - CUSTOM + config: + strings: + - FIXME + - CUSTOM ``` **NOTE**: values specified here *override* the defaults, they are not diff --git a/lib/fix-me.js b/lib/fix-me.js index e8cd911..98e35c3 100644 --- a/lib/fix-me.js +++ b/lib/fix-me.js @@ -18,10 +18,14 @@ FixMe.prototype.runEngine = function(){ self = this; if (fs.existsSync('/config.json')) { - var overrides = JSON.parse(fs.readFileSync('/config.json')); + var userConfig = JSON.parse(fs.readFileSync('/config.json')); - for (var prop in overrides) { - config[prop] = overrides[prop]; + config.include_paths = userConfig.include_paths; + + if (userConfig.config) { + for (var prop in userConfig.config) { + config[prop] = userConfig.config[prop]; + } } }