diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2015-07-31 15:08:56 +0200 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@gmail.com> | 2015-07-31 15:08:56 +0200 |
commit | d699dff872a36b33719385ddf8b641afdc5bada1 (patch) | |
tree | 46ee428353dd09a94fdf60c03d219d4fb24ee31e /lib/configuration.js | |
parent | 501843d6243e0be3bcab0e7c9cc1b6ff2886d4f4 (diff) | |
download | gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.zip gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.tar.gz gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.tar.bz2 |
Use Book.resolve when possible
For added consistency
Diffstat (limited to 'lib/configuration.js')
-rw-r--r-- | lib/configuration.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index 9e839e6..254367b 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -100,7 +100,7 @@ Configuration.prototype.load = function() { try { configPath = require.resolve( - path.resolve(that.book.root, that.options.configFile) + that.book.resolve(that.options.configFile) ); // Invalidate node.js cache for livreloading @@ -125,7 +125,7 @@ Configuration.prototype.load = function() { that.book.log.warn.ln("you should specify a gitbook version to use in your book.json, for example: "+(_.first(pkg.version.split("."))+".x.x")); } - that.options.output = path.resolve(that.options.output || path.join(that.book.root, "_book")); + that.options.output = path.resolve(that.options.output || that.book.resolve("_book")); that.options.plugins = normalizePluginsList(that.options.plugins); that.options.defaultsPlugins = normalizePluginsList(that.options.defaultsPlugins || ""); that.options.plugins = _.union(that.options.plugins, that.options.defaultsPlugins); |