summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Preynat <johan.preynat@gmail.com>2016-05-02 14:34:34 +0200
committerJohan Preynat <johan.preynat@gmail.com>2016-05-02 14:34:34 +0200
commitc516a5c1bdf34f67d7e1e74e51bcea3ea6601639 (patch)
tree0d7c3e63b754a6efbcf1b119da23f3c5787763ac
parent429431c13c24606d9f9b8be97bec740350d622c0 (diff)
downloadgitbook-c516a5c1bdf34f67d7e1e74e51bcea3ea6601639.zip
gitbook-c516a5c1bdf34f67d7e1e74e51bcea3ea6601639.tar.gz
gitbook-c516a5c1bdf34f67d7e1e74e51bcea3ea6601639.tar.bz2
lib/fs/node.js: Use fresh-require@1.0.3 to read uncached configuration files
-rw-r--r--lib/fs/node.js3
-rw-r--r--package.json1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/fs/node.js b/lib/fs/node.js
index e05cb65..9b8c056 100644
--- a/lib/fs/node.js
+++ b/lib/fs/node.js
@@ -1,5 +1,6 @@
var path = require('path');
var Immutable = require('immutable');
+var fresh = require('fresh-require');
var fs = require('../utils/fs');
var FS = require('../models/fs');
@@ -24,7 +25,7 @@ function fsReadDir(folder) {
}
function fsLoadObject(filename) {
- return require(filename);
+ return fresh(filename, require);
}
module.exports = function createNodeFS(root) {
diff --git a/package.json b/package.json
index 6f8b6df..b729c72 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
"escape-string-regexp": "1.0.5",
"eslint": "^2.2.0",
"extend": "^3.0.0",
+ "fresh-require": "1.0.3",
"front-matter": "2.0.7",
"gitbook-asciidoc": "1.1.0",
"gitbook-markdown": "1.2.0",