title: Reloading lorenwest's NodeJS config module
body: <p>I need to reload the config lorenwests config module in multiple files if someone sends the <code>reload</code> command. To achieve that, I followed <a href="https://github.com/lorenwest/node-config/issues/34#issuecomment-9040733" rel="nofollow noreferrer">this issue</a> but it didn't work out for me.</p>
  
  <p>I'm working on NodeJS version 8.5 if that helps.</p>
  
  <p>These are my code files:</p>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>let vorpal = require("vorpal")();
  let { childConfig } = require("./child.js");
  
  vorpal
      .command("reload", "Reloads the config", {})
      .action((args, callback) =&gt; {
          delete require.cache[require.resolve("config")];
          vorpal.log("reloaded config");
          callback();
      });
  
  vorpal
      .command("config &lt;item&gt;", "Shows an item from the config", {})
      .action((args, callback) =&gt; {
          vorpal.log("main config: `" + require("config").get(args.item) + "`, child config: `" + childConfig(args.item) + "`");
          callback();
      });
  
  vorpal
      .delimiter("test$")
      .show();
  </code></pre>
  
  <p><strong>child.js</strong></p>
  
  <pre><code>exports.childConfig = function (cfg) {
      return require("config").get(cfg);
  }
  </code></pre>
  
  <p><strong>config/default.js</strong></p>
  
  <pre><code>module.exports = {
      "hello": "test",
  }
  </code></pre>