awesome-cordova-plugins/scripts/docs/dgeni/processors/debug.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-05-16 20:40:49 +08:00
'use strict';
module.exports = function test() {
2017-03-24 10:07:59 +08:00
return {
name: 'debug',
$runBefore: ['rendering-docs'],
2020-05-16 20:40:49 +08:00
$process: function (docs) {
docs.forEach(function (doc) {
if (doc.name == 'Camera') {
2017-03-24 10:07:59 +08:00
console.log(doc.tags);
2020-05-16 20:40:49 +08:00
doc.tags.forEach(function (tag) {
if (tag.tagName == 'classes') {
2017-03-24 10:07:59 +08:00
}
});
2020-05-16 20:40:49 +08:00
doc.moduleDoc.exports.forEach(function (d, i) {
if (d.name === 'CameraOptions') {
2017-03-24 10:07:59 +08:00
console.log('Name: ' + d.name);
console.log('Type: ' + d.docType);
console.log('First member: ', d.members[0]);
}
});
var exports = doc.exportSymbol.parent.exports;
2020-05-16 20:40:49 +08:00
for (var p in exports) {
if (p == 'CameraOptions') {
2017-03-24 10:07:59 +08:00
var x = exports[p];
console.log(x.members.quality);
}
}
2020-05-16 20:40:49 +08:00
doc.members.forEach(function (method) {
if (method.name === 'getPicture') {
2017-03-24 10:07:59 +08:00
console.log(method);
}
2020-05-16 20:40:49 +08:00
});
2017-03-24 10:07:59 +08:00
}
2020-05-16 20:40:49 +08:00
});
},
};
};