Skip to content

Commit ab98003

Browse files
authored
remove a use of resource loading (#2337)
1 parent b039e21 commit ab98003

File tree

5 files changed

+1
-25
lines changed

5 files changed

+1
-25
lines changed

lib/resources/sdk_footer_text.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/resources/sdk_footer_text.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/src/generator/generator.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ library dartdoc.generator;
77

88
import 'dart:async' show Future;
99

10-
import 'package:analyzer/file_system/file_system.dart';
1110
import 'package:dartdoc/src/dartdoc_options.dart';
1211
import 'package:dartdoc/src/model/model.dart' show PackageGraph;
1312
import 'package:dartdoc/src/package_meta.dart';
@@ -38,9 +37,6 @@ mixin GeneratorContext on DartdocOptionContextBase {
3837

3938
List<String> get footerText => optionSet['footerText'].valueAt(context);
4039

41-
// Synthetic. TODO(jcollins-g): Eliminate special case for SDK and use config file.
42-
bool get addSdkFooter => optionSet['addSdkFooter'].valueAt(context);
43-
4440
List<String> get header => optionSet['header'].valueAt(context);
4541

4642
bool get prettyIndexJson => optionSet['prettyIndexJson'].valueAt(context);
@@ -75,14 +71,6 @@ Future<List<DartdocOption<Object>>> createGeneratorOptions(
7571
'package name and version).',
7672
mustExist: true,
7773
splitCommas: true),
78-
DartdocOptionSyntheticOnly<bool>(
79-
'addSdkFooter',
80-
(DartdocSyntheticOption<bool> option, Folder dir) {
81-
return option.root['topLevelPackageMeta'].valueAt(dir).isSdk;
82-
},
83-
resourceProvider,
84-
help: 'Whether the SDK footer text should be added (synthetic)',
85-
),
8674
DartdocOptionArgFile<List<String>>('header', [], resourceProvider,
8775
isFile: true,
8876
help: 'Paths to files with content to add to page headers.',

lib/src/generator/html_resources.g.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ const List<String> resource_names = [
1010
'package:dartdoc/resources/play_button.svg',
1111
'package:dartdoc/resources/readme.md',
1212
'package:dartdoc/resources/script.js',
13-
'package:dartdoc/resources/sdk_footer_text.html',
14-
'package:dartdoc/resources/sdk_footer_text.md',
1513
'package:dartdoc/resources/styles.css',
1614
'package:dartdoc/resources/typeahead.bundle.min.js'
1715
];

lib/src/generator/templates.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ library dartdoc.templates;
66

77
import 'dart:async' show Future;
88
import 'dart:io' show File, Directory;
9-
import 'dart:isolate';
109

1110
import 'package:dartdoc/dartdoc.dart';
1211
import 'package:dartdoc/src/generator/resource_loader.dart' as loader;
@@ -101,6 +100,7 @@ Future<Map<String, String>> _loadPartials(
101100

102101
abstract class _TemplatesLoader {
103102
Future<Map<String, String>> loadPartials();
103+
104104
Future<String> loadTemplate(String name);
105105
}
106106

@@ -196,11 +196,6 @@ class Templates {
196196
var templatesDir = context.templatesDir;
197197
var format = context.format;
198198
var footerTextPaths = context.footerText;
199-
if (context.addSdkFooter) {
200-
var sdkFooter = await Isolate.resolvePackageUri(
201-
Uri.parse('package:dartdoc/resources/sdk_footer_text.$format'));
202-
footerTextPaths.add(path.canonicalize(sdkFooter.toFilePath()));
203-
}
204199

205200
if (templatesDir != null) {
206201
return fromDirectory(Directory(templatesDir), format,

0 commit comments

Comments
 (0)