From d2d05fcb880afc92f33242fcb9f613ccdc4a4d36 Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Sun, 2 Dec 2012 20:26:05 -0800 Subject: [PATCH] fix conf.json issues - don't try to create conf.json if it doesn't exist (resolves a permissions issue when installing with npm -g) - add default values for recently added properties (hopefully fixes Travis CI build) --- conf.json.EXAMPLE | 5 +++++ jsdoc.js | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conf.json.EXAMPLE b/conf.json.EXAMPLE index 24881c49..490d4758 100644 --- a/conf.json.EXAMPLE +++ b/conf.json.EXAMPLE @@ -7,5 +7,10 @@ "excludePattern": "(^|\\/|\\\\)_" }, "plugins": [], + "templates": { + "docletFormat": "taffydb", + "cleverLinks": false, + "monospaceLinks": false + }, "jsVersion": 180 } \ No newline at end of file diff --git a/jsdoc.js b/jsdoc.js index e024a118..1085a834 100644 --- a/jsdoc.js +++ b/jsdoc.js @@ -310,13 +310,12 @@ function main() { env.opts = jsdoc.opts.args.parse(env.args); try { - env.conf = new Config( fs.readFileSync( env.opts.configure || env.dirname + '/conf.json' ) ).get(); + env.conf = new Config( fs.readFileSync( path.join(env.opts.configure || env.dirname, 'conf.json') ) ).get(); } catch (e) { try { - //Try to copy over the example conf - var example = fs.readFileSync(env.dirname + '/conf.json.EXAMPLE', 'utf8'); - fs.writeFileSync(env.dirname + '/conf.json', example, 'utf8'); + // Use the example file if possible + var example = fs.readFileSync(path.join(env.dirname, 'conf.json.EXAMPLE'), 'utf8'); env.conf = JSON.parse(example); } catch(e) {