Skip to content

Commit 4c4bcb6

Browse files
Bugfix: Theme "minimal" shows wrong icons
1 parent 7c04465 commit 4c4bcb6

File tree

6 files changed

+53
-15
lines changed

6 files changed

+53
-15
lines changed

bin/typedoc.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ declare module td {
8282
}
8383
}
8484
declare module td {
85+
enum ModuleKind {
86+
None = 0,
87+
CommonJS = 1,
88+
AMD = 2,
89+
}
90+
enum ScriptTarget {
91+
ES3 = 0,
92+
ES5 = 1,
93+
ES6 = 2,
94+
Latest = 2,
95+
}
8596
enum OptionScope {
8697
TypeDoc = 0,
8798
TypeScript = 1,
@@ -2863,7 +2874,7 @@ declare module td {
28632874
}
28642875
}
28652876
declare module td {
2866-
class MinimalTheme extends Theme {
2877+
class MinimalTheme extends DefaultTheme {
28672878
/**
28682879
* Create a new DefaultTheme instance.
28692880
*

bin/typedoc.js

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,19 @@ var td;
184184
})(td || (td = {}));
185185
var td;
186186
(function (td) {
187+
(function (ModuleKind) {
188+
ModuleKind[ModuleKind["None"] = 0] = "None";
189+
ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS";
190+
ModuleKind[ModuleKind["AMD"] = 2] = "AMD";
191+
})(td.ModuleKind || (td.ModuleKind = {}));
192+
var ModuleKind = td.ModuleKind;
193+
(function (ScriptTarget) {
194+
ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3";
195+
ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5";
196+
ScriptTarget[ScriptTarget["ES6"] = 2] = "ES6";
197+
ScriptTarget[ScriptTarget["Latest"] = 2] = "Latest";
198+
})(td.ScriptTarget || (td.ScriptTarget = {}));
199+
var ScriptTarget = td.ScriptTarget;
187200
(function (OptionScope) {
188201
OptionScope[OptionScope["TypeDoc"] = 0] = "TypeDoc";
189202
OptionScope[OptionScope["TypeScript"] = 1] = "TypeScript";
@@ -690,10 +703,6 @@ var td;
690703
this.settings.expandInputFiles();
691704
this.settings.out = td.Path.resolve(this.settings.out);
692705
this.generate(this.settings.inputFiles, this.settings.out);
693-
if (this.hasErrors) {
694-
ts.sys.write(ts.sys.newLine);
695-
this.log('Documentation could not be generated due to the errors above.');
696-
}
697706
}
698707
}
699708
};
@@ -751,7 +760,13 @@ var td;
751760
}
752761
else {
753762
this.renderer.render(result.project, outputDirectory);
754-
this.log(td.Util.format('Documentation generated at %s', this.settings.out));
763+
if (this.hasErrors) {
764+
ts.sys.write(ts.sys.newLine);
765+
this.log('Documentation could not be generated due to the errors above.');
766+
}
767+
else {
768+
this.log(td.Util.format('Documentation generated at %s', this.settings.out));
769+
}
755770
}
756771
return true;
757772
};
@@ -6447,7 +6462,7 @@ var td;
64476462
});
64486463
};
64496464
return MinimalTheme;
6450-
})(td.Theme);
6465+
})(td.DefaultTheme);
64516466
td.MinimalTheme = MinimalTheme;
64526467
})(td || (td = {}));
64536468
module.exports = td;

gruntfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,4 @@ module.exports = function(grunt)
8888
FS.writeFileSync(Path.join(base, directory, 'specs.json'), data);
8989
});
9090
});
91-
9291
};

src/td/Application.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,6 @@ module td
158158
this.settings.expandInputFiles();
159159
this.settings.out = Path.resolve(this.settings.out);
160160
this.generate(this.settings.inputFiles, this.settings.out);
161-
162-
if (this.hasErrors) {
163-
ts.sys.write(ts.sys.newLine);
164-
this.log('Documentation could not be generated due to the errors above.');
165-
}
166161
}
167162
}
168163
}
@@ -225,7 +220,12 @@ module td
225220
this.log(Util.format('JSON written to %s', this.settings.json));
226221
} else {
227222
this.renderer.render(result.project, outputDirectory);
228-
this.log(Util.format('Documentation generated at %s', this.settings.out));
223+
if (this.hasErrors) {
224+
ts.sys.write(ts.sys.newLine);
225+
this.log('Documentation could not be generated due to the errors above.');
226+
} else {
227+
this.log(Util.format('Documentation generated at %s', this.settings.out));
228+
}
229229
}
230230

231231
return true;

src/td/Settings.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
module td
22
{
3+
export enum ModuleKind {
4+
None = 0,
5+
CommonJS = 1,
6+
AMD = 2,
7+
}
8+
9+
export enum ScriptTarget {
10+
ES3 = 0,
11+
ES5 = 1,
12+
ES6 = 2,
13+
Latest = 2,
14+
}
15+
316
export enum OptionScope {
417
TypeDoc, TypeScript
518
}

src/td/output/themes/MinimalTheme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module td
22
{
3-
export class MinimalTheme extends Theme
3+
export class MinimalTheme extends DefaultTheme
44
{
55
/**
66
* Create a new DefaultTheme instance.

0 commit comments

Comments
 (0)