Skip to content

Commit

Permalink
Merge pull request #44 from qooxdoo/cboulanger-fix-meta
Browse files Browse the repository at this point in the history
Fixes a problem where empty __init__.js would break compilation
  • Loading branch information
hkollmann authored Sep 29, 2020
2 parents 692daa2 + d2674d1 commit ae20044
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ qx.Class.define("qxl.apiviewer.compile.LibraryApi", {
let target = maker.getTarget();
let outDir = target.getOutputDir();
qxl.apiviewer.ClassLoader.setBaseUri(path.join(outDir, "transpiled") + path.sep);


let env = environment;
let excludeFromAPIViewer = env.excludeFromAPIViewer || env["qxl.apiviewer.exclude"];
let includeToAPIViewer = env.includeToAPIViewer || env["qxl.apiviewer.include"];
Expand Down Expand Up @@ -274,10 +274,12 @@ qx.Class.define("qxl.apiviewer.compile.LibraryApi", {
meta = meta.replace(/^\s*\/\*/mg, "");
meta = meta.replace(/^\s*\*\//mg, "");
meta = qx.tool.compiler.jsdoc.Parser.parseComment(meta);
meta = meta["@description"][0].body;
fs.writeFileSync(d, meta, {
encoding: "utf8"
});
if (meta && Array.isArray(meta["@description"]) && meta["@description"].length) {
meta = meta["@description"][0].body;
fs.writeFileSync(d, meta, {
encoding: "utf8"
});
}
}
}
});
Expand Down

0 comments on commit ae20044

Please sign in to comment.