Handle interfaces in the generate-externs task
This commit is contained in:
@@ -28,6 +28,7 @@ exports.publish = function(data, opts) {
|
||||
[
|
||||
{define: {isObject: true}},
|
||||
{api: {isString: true}},
|
||||
{'interface': {is: true}},
|
||||
function() {
|
||||
return this.meta && (/[\\\/]externs$/).test(this.meta.path);
|
||||
}
|
||||
@@ -40,6 +41,7 @@ exports.publish = function(data, opts) {
|
||||
var defines = [];
|
||||
var typedefs = [];
|
||||
var externs = [];
|
||||
var interfaces = [];
|
||||
docs.filter(function(doc) {
|
||||
var include = true;
|
||||
var constructor = doc.memberof;
|
||||
@@ -118,7 +120,7 @@ exports.publish = function(data, opts) {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
var target = isExterns ? externs : symbols;
|
||||
var target = isExterns ? externs : (doc.interface ? interfaces : symbols);
|
||||
target.push(symbol);
|
||||
}
|
||||
});
|
||||
@@ -128,7 +130,8 @@ exports.publish = function(data, opts) {
|
||||
symbols: symbols,
|
||||
defines: defines,
|
||||
typedefs: typedefs,
|
||||
externs: externs
|
||||
externs: externs,
|
||||
interfaces: interfaces
|
||||
}, null, 2));
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user