Commit 536e69d7 authored by Björn Bartels's avatar Björn Bartels

fix some 'scrutinizer' issues

parent 0dfdb8de
......@@ -82,6 +82,7 @@ function buildDocs() {
// build the doc page...
var pageSource = this.renderdocs(data);
/** global: Buffer */
file.contents = new Buffer(pageSource);
// Write new file to disk if necessary
......
......@@ -18,10 +18,10 @@ module.exports = function(dir) {
if (ext === '.json' || ext === '.js') {
delete require.cache[require.resolve(dataFiles[i])];
data = require(dataFiles[i])
let data = require(dataFiles[i])
}
else if (ext === '.yml') {
data = yaml.safeLoad(fs.readFileSync(dataFiles[i]));
let data = yaml.safeLoad(fs.readFileSync(dataFiles[i]));
}
this.data[name] = data;
......
......@@ -23,7 +23,7 @@ function loadHandlebarsHelpers (dir) {
this.handlebars.registerHelper(name, helper);
}
catch (e) {
console.warn('Error when loading ' + name + '.js as a Handlebars helper.', helper, e);
console.warn('Error when loading ' + name + '.js as a Handlebars helper.', e);
}
}
}
......
......@@ -57,7 +57,7 @@ function renderPage ( page_src, page_target, data, markdown ) {
pageSource = String(pageSource).replace('{__MDBODY__}', markdown);
}
/** global: Buffer */
var filecontents = new Buffer(pageSource);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment