Skip to content

Commit 43c2663

Browse files
authored
Move templates into lib/templates and other clean up. (#3677)
1 parent 40af8ea commit 43c2663

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+372
-441
lines changed

lib/src/generator/templates.aot_renderers_for_html.dart

Lines changed: 309 additions & 343 deletions
Large diffs are not rendered by default.

lib/src/generator/templates.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ abstract class Templates {
122122
resourceProvider: context.resourceProvider);
123123
} else if (forceRuntimeTemplates) {
124124
var directory = await context.resourceProvider
125-
.getResourceFolder('package:dartdoc/templates/html');
125+
.getResourceFolder('package:dartdoc/templates');
126126
return RuntimeTemplates._create(directory,
127127
resourceProvider: context.resourceProvider);
128128
} else {

lib/src/mustachio/annotations.dart

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ class Renderer {
2828
/// render the [context] object while generating documentation in HTML.
2929
final String standardHtmlTemplate;
3030

31-
/// The unparsed, string form of the URI of the _standard_ Markdown template.
32-
///
33-
/// This represents the Mustache template that dartdoc uses out-of-the-box to
34-
/// render the [context] object while generating documentation in Markdown.
35-
final String standardMdTemplate;
36-
3731
/// A set of types which are "visible" to the Mustache runtime interpreter.
3832
/// Mustache runtime-rendering has access to all of a type's public getters if
3933
/// the type is visible to Mustache.
@@ -53,20 +47,16 @@ class Renderer {
5347
this.context,
5448
String standardTemplateBasename, {
5549
this.visibleTypes = const {},
56-
}) : standardHtmlTemplate =
57-
'lib/templates/html/$standardTemplateBasename.html',
58-
standardMdTemplate = 'lib/templates/md/$standardTemplateBasename.md';
50+
}) : standardHtmlTemplate = 'lib/templates/$standardTemplateBasename.html';
5951

6052
@visibleForTesting
6153
const Renderer.forTest(
6254
this.name,
6355
this.context,
6456
String standardTemplateBasename, {
6557
this.visibleTypes = const {},
66-
}) : standardHtmlTemplate =
67-
'test/mustachio/templates/$standardTemplateBasename.html',
68-
standardMdTemplate =
69-
'test/mustachio/templates/$standardTemplateBasename.md';
58+
}) : standardHtmlTemplate =
59+
'test/mustachio/templates/$standardTemplateBasename.html';
7060
}
7161

7262
/// A container for a type, [T], which is the type of a context object,
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)