Fix some JSDoc issues

Also makes a few minor changes to the template, so it can be used until
we have a new doc generation process. JSDoc output is written to
build/apidoc.
This commit is contained in:
ahocevar
2018-05-10 17:14:17 +02:00
parent 1e0086460b
commit e810387956
17 changed files with 66 additions and 61 deletions

View File

@@ -22,7 +22,7 @@ function addDefaultExportPath(obj) {
const lines = file.split('\n');
let hasDefaultExport = false;
for (let i = 0, ii = lines.length; i < ii; ++i) {
hasDefaultExport = hasDefaultExport || lines[i].indexOf('export default ') == 0;
hasDefaultExport = hasDefaultExport || /^export default [^\{]/.test(lines[i]);
const match = lines[i].match(/^export default ([A-Za-z_$][A-Za-z0-9_$]+);$/);
if (match) {
// Use variable name if default export is assigned to a variable.