summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/configuration.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/configuration.js b/lib/configuration.js
index 3f8c822..a26135c 100644
--- a/lib/configuration.js
+++ b/lib/configuration.js
@@ -96,8 +96,17 @@ Configuration.prototype.load = function() {
return Q()
.then(function() {
+ var configPath, config;
+
+ configPath = require.resolve(
+ path.resolve(that.book.root, that.options.configFile)
+ );
+
+ // Invalidate node.js cache for livreloading
+ delete require.cache[configPath];
+
try {
- var _config = require(path.resolve(that.book.root, that.options.configFile));
+ _config = require(configPath);
that.options = _.merge(
that.options,
_.omit(_config, 'configFile', 'defaultsPlugins', 'generator', 'extension')