chore(doc-gen): add temporary dump of all API docs

Accessible at `angular/dist/public_docs/overview-dump.html`
This commit is contained in:
Peter Bacon Darwin 2015-03-31 22:12:34 +01:00
parent 609201e109
commit adab6c0728
3 changed files with 68 additions and 0 deletions

View File

@ -42,6 +42,7 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
.processor(require('./processors/processClassDocs')) .processor(require('./processors/processClassDocs'))
.processor(require('./processors/generateNavigationDoc')) .processor(require('./processors/generateNavigationDoc'))
.processor(require('./processors/extractTitleFromGuides')) .processor(require('./processors/extractTitleFromGuides'))
.processor(require('./processors/createOverviewDump'))
// Configure the log service // Configure the log service
.config(function(log) { .config(function(log) {

View File

@ -0,0 +1,24 @@
var _ = require('lodash');
module.exports = function createOverviewDump() {
return {
$runAfter: ['processModuleDocs', 'processClassDocs'],
$runBefore: ['docs-processed'],
$process: function(docs) {
var overviewDoc = {
id: 'overview-dump',
aliases: ['overview-dump'],
path: 'overview-dump',
outputPath: 'overview-dump.html',
modules: []
};
_.forEach(docs, function(doc) {
if ( doc.docType === 'module' ) {
overviewDoc.modules.push(doc);
}
});
docs.push(overviewDoc);
}
};
};

View File

@ -0,0 +1,43 @@
{% include "lib/paramList.html" -%}
<<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
h2 {
padding-left: 20px;
}
h3 {
padding-left: 50px;
}
h4 {
padding-left: 60px;
}
</style>
</head>
<body>
<h1>Modules</h1>
{% for module in doc.modules %}
<h2>{$ module.id $}
{%- if module.publicModule %} (public){% endif %}</h2>
{% for export in module.exports %}
<h3>{$ export.name $}</h3>
{%- if export.constructorDoc %}
<h4>{$ doc.constructorDoc.name $}{$ paramList(doc.constructorDoc.params) $}</h4>
{% endif -%}
{%- for member in export.members %}
<h4>{$ member.name $}{$ paramList(member.params) $}</h4>
{% endfor %}
{% endfor %}
{% endfor %}
</body>
</html>