Skip to content

Commit 6adc7f2

Browse files
Updated TypeDoc
1 parent c571bfd commit 6adc7f2

File tree

4 files changed

+45
-24
lines changed

4 files changed

+45
-24
lines changed

gruntfile.js

+21-17
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module.exports = function (grunt) {
22
'use strict';
33

44
grunt.loadNpmTasks('grunt-contrib-copy');
5-
grunt.loadNpmTasks('grunt-typedoc');
65
grunt.loadNpmTasks('grunt-gh-pages');
76

87
function getTypeDocPath() {
@@ -18,22 +17,6 @@ module.exports = function (grunt) {
1817
dest: 'dist/'
1918
}
2019
},
21-
typedoc: {
22-
build: {
23-
options: {
24-
module: 'commonjs',
25-
out: 'dist/',
26-
name: 'TypeDoc API Documentation',
27-
target: 'es5',
28-
hideGenerator: true,
29-
readme: 'none',
30-
gaID: 'UA-53674298-1',
31-
gaSite: 'typedoc.io',
32-
theme: 'theme'
33-
},
34-
src: getTypeDocPath()
35-
}
36-
},
3720
'gh-pages': {
3821
'dist': {
3922
options: {
@@ -44,6 +27,27 @@ module.exports = function (grunt) {
4427
}
4528
});
4629

30+
grunt.registerTask('typedoc', function() {
31+
var Path = require('path');
32+
var TypeDoc = require('typedoc');
33+
34+
var settings = new TypeDoc.Settings();
35+
settings.inputFiles.push(getTypeDocPath());
36+
settings.expandInputFiles();
37+
38+
settings.out = Path.resolve('./dist/');
39+
settings.name = 'TypeDoc API Documentation';
40+
settings.hideGenerator = true;
41+
settings.readme = 'none';
42+
settings.gaID = 'UA-53674298-1';
43+
settings.gaSite = 'typedoc.io';
44+
settings.theme = 'theme';
45+
settings.mode = TypeDoc.SourceFileMode.File;
46+
47+
var app = new TypeDoc.Application(settings);
48+
app.generate(settings.inputFiles, settings.out);
49+
});
50+
4751
grunt.registerTask('build', 'Create api documentation', [
4852
'typedoc',
4953
'copy'

local.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"typeDocPath": "../Application/src/"
2+
"typeDocPath": "../../Modules/typedoc/src/"
33
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"grunt": "^0.4.5",
2929
"grunt-cli": "^0.1.13",
3030
"grunt-contrib-copy": "^0.5.0",
31-
"grunt-typedoc": "^0.1.1",
32-
"grunt-gh-pages": "^0.9.1"
31+
"grunt-gh-pages": "^0.9.1",
32+
"typedoc": "^0.2"
3333
}
3434
}

theme/partials/header.hbs

+21-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@
1818
<div id="tsd-filter">
1919
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
2020
<div class="tsd-filter-group">
21+
<div class="tsd-select" id="tsd-filter-visibility">
22+
<span class="tsd-select-label">All</span>
23+
<ul class="tsd-select-list">
24+
<li data-value="public">Public</li>
25+
<li data-value="protected">Public/Protected</li>
26+
<li data-value="private" class="selected">All</li>
27+
</ul>
28+
</div>
29+
2130
<input type="checkbox" id="tsd-filter-inherited" checked />
2231
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
2332

24-
<input type="checkbox" id="tsd-filter-private" checked />
25-
<label class="tsd-widget" for="tsd-filter-private">Private</label>
26-
2733
{{#unless settings.excludeExternals}}
2834
<input type="checkbox" id="tsd-filter-externals" checked />
2935
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
@@ -44,7 +50,18 @@
4450
<ul class="tsd-breadcrumb">
4551
{{#with model}}{{> breadcrumb}}{{/with}}
4652
</ul>
47-
<h1>{{model.kindString}} {{model.name}}</h1>
53+
<h1>{{#compact}}
54+
{{model.kindString}}&nbsp;
55+
{{model.name}}
56+
{{#if model.typeParameters}}
57+
&lt;
58+
{{#each model.typeParameters}}
59+
{{#if @index}},&nbsp;{{/if}}
60+
{{name}}
61+
{{/each}}
62+
&gt;
63+
{{/if}}
64+
{{/compact}}</h1>
4865
</div>
4966
</div>
5067
</header>

0 commit comments

Comments
 (0)