mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
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)
This commit is contained in:
parent
3227854077
commit
d2d05fcb88
@ -7,5 +7,10 @@
|
|||||||
"excludePattern": "(^|\\/|\\\\)_"
|
"excludePattern": "(^|\\/|\\\\)_"
|
||||||
},
|
},
|
||||||
"plugins": [],
|
"plugins": [],
|
||||||
|
"templates": {
|
||||||
|
"docletFormat": "taffydb",
|
||||||
|
"cleverLinks": false,
|
||||||
|
"monospaceLinks": false
|
||||||
|
},
|
||||||
"jsVersion": 180
|
"jsVersion": 180
|
||||||
}
|
}
|
||||||
7
jsdoc.js
7
jsdoc.js
@ -310,13 +310,12 @@ function main() {
|
|||||||
env.opts = jsdoc.opts.args.parse(env.args);
|
env.opts = jsdoc.opts.args.parse(env.args);
|
||||||
|
|
||||||
try {
|
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) {
|
catch (e) {
|
||||||
try {
|
try {
|
||||||
//Try to copy over the example conf
|
// Use the example file if possible
|
||||||
var example = fs.readFileSync(env.dirname + '/conf.json.EXAMPLE', 'utf8');
|
var example = fs.readFileSync(path.join(env.dirname, 'conf.json.EXAMPLE'), 'utf8');
|
||||||
fs.writeFileSync(env.dirname + '/conf.json', example, 'utf8');
|
|
||||||
env.conf = JSON.parse(example);
|
env.conf = JSON.parse(example);
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user