Regenerate symbols if parents have changed

The generate-symbols.js task runs JSDoc on source files.  Because this takes a long time (13s) to run on the whole library, the resulting symbols file includes additional metadata to make it possible to do incremental symbol generation on subsequent runs.  The 'path' and 'extends' metadata for a symbol are used to determine what needs to be regenerated.
This commit is contained in:
Tim Schaub
2014-04-10 14:38:49 -06:00
parent 1273c26f7a
commit 88d67b7370
2 changed files with 58 additions and 11 deletions
+2 -3
View File
@@ -17,7 +17,7 @@ exports.publish = function(data, opts) {
// get all doclets with the "api" property.
var docs = data({api: {isString: true}}).get();
// get sorted symbols, filter out those that are members of private classes
// get symbols data, filter out those that are members of private classes
var symbols = docs.filter(function(doc) {
var include = true;
var constructor = doc.memberof;
@@ -30,10 +30,9 @@ exports.publish = function(data, opts) {
}).map(function(doc) {
return {
name: doc.longname,
extends: doc.augments,
path: path.join(doc.meta.path, doc.meta.filename)
};
}).sort(function(a, b) {
return a.name < b.name ? -1 : 1;
});
process.stdout.write(JSON.stringify({symbols: symbols}, null, 2));