Skip to content

Commit 693fd88

Browse files
authored
remove the creative commons footer text (#1515)
* remove cc footer text * update the generated files * add cc footer text back for the sdk docs * update a string interpolation location
1 parent 56a78e0 commit 693fd88

File tree

666 files changed

+21
-2664
lines changed

Some content is hidden

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

666 files changed

+21
-2664
lines changed

bin/dartdoc.dart

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
library dartdoc.bin;
66

77
import 'dart:io';
8+
import 'dart:isolate' show Isolate;
89

910
import 'package:analyzer/file_system/physical_file_system.dart';
1011
import 'package:analyzer/src/dart/sdk/sdk.dart';
@@ -44,10 +45,7 @@ main(List<String> arguments) async {
4445
exit(1);
4546
}
4647

47-
bool sdkDocs = false;
48-
if (args['sdk-docs']) {
49-
sdkDocs = true;
50-
}
48+
final bool sdkDocs = args['sdk-docs'];
5149

5250
if (args['show-progress']) {
5351
_showProgress = true;
@@ -63,7 +61,8 @@ main(List<String> arguments) async {
6361
Directory inputDir = new Directory(args['input']);
6462
if (!inputDir.existsSync()) {
6563
stderr.writeln(
66-
" fatal error: unable to locate the input directory at ${inputDir.path}.");
64+
" fatal error: unable to locate the input directory at ${inputDir
65+
.path}.");
6766
exit(1);
6867
}
6968

@@ -95,6 +94,14 @@ main(List<String> arguments) async {
9594

9695
List<String> footerTextFilePaths =
9796
args['footer-text'].map(_resolveTildePath).toList() as List<String>;
97+
98+
// If we're generating docs for the Dart SDK, we insert a copyright footer.
99+
if (sdkDocs) {
100+
Uri footerCopyrightUri = await Isolate.resolvePackageUri(
101+
Uri.parse('package:dartdoc/src/sdk_footer_text.html'));
102+
footerTextFilePaths = [footerCopyrightUri.toFilePath()];
103+
}
104+
98105
for (String footerFilePath in footerTextFilePaths) {
99106
if (!new File(footerFilePath).existsSync()) {
100107
stderr.writeln(
@@ -122,8 +129,9 @@ main(List<String> arguments) async {
122129
: new PackageMeta.fromDir(inputDir);
123130

124131
if (!packageMeta.isValid) {
132+
final String firstError = packageMeta.getInvalidReasons().first;
125133
stderr.writeln(
126-
' fatal error: Unable to generate documentation: ${packageMeta.getInvalidReasons().first}.');
134+
' fatal error: Unable to generate documentation: $firstError.');
127135
exit(1);
128136
}
129137

@@ -245,8 +253,8 @@ ArgParser _createArgsParser() {
245253
parser.addOption('footer-text',
246254
allowMultiple: true,
247255
splitCommas: true,
248-
help:
249-
'paths to footer-text files (optional text next to the copyright).');
256+
help: 'paths to footer-text files '
257+
'(optional text next to the package name and version).');
250258
parser.addOption('exclude',
251259
allowMultiple: true, splitCommas: true, help: 'Library names to ignore.');
252260
parser.addOption('include',
@@ -311,6 +319,7 @@ ArgParser _createArgsParser() {
311319
}
312320

313321
int _progressCounter = 0;
322+
314323
void _onProgress(var file) {
315324
if (_showProgress && _progressCounter % 5 == 0) {
316325
stdout.write('.');

lib/src/sdk_footer_text.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
&bull;
2+
<span class="copyright no-break">
3+
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
4+
</span>

lib/templates/_footer.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
<span class="no-break">
55
{{package.name}} {{package.version}}
66
</span>
7-
&bull;
8-
<span class="copyright no-break">
9-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
10-
</span>
117

128
<!-- footer-text placeholder -->
139
</footer>

testing/test_package_docs/anonymous_library/anonymous_library-library.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ <h5>library anonymous_library</h5>
100100
<span class="no-break">
101101
test_package 0.0.1
102102
</span>
103-
&bull;
104-
<span class="copyright no-break">
105-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
106-
</span>
107103

108104
</footer>
109105

testing/test_package_docs/anonymous_library/doesStuff.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ <h5>function doesStuff</h5>
7070
<span class="no-break">
7171
test_package 0.0.1
7272
</span>
73-
&bull;
74-
<span class="copyright no-break">
75-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
76-
</span>
7773

7874
</footer>
7975

testing/test_package_docs/another_anonymous_lib/another_anonymous_lib-library.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ <h5>library another_anonymous_lib</h5>
100100
<span class="no-break">
101101
test_package 0.0.1
102102
</span>
103-
&bull;
104-
<span class="copyright no-break">
105-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
106-
</span>
107103

108104
</footer>
109105

testing/test_package_docs/another_anonymous_lib/greeting.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ <h5>function greeting</h5>
7070
<span class="no-break">
7171
test_package 0.0.1
7272
</span>
73-
&bull;
74-
<span class="copyright no-break">
75-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
76-
</span>
7773

7874
</footer>
7975

testing/test_package_docs/code_in_comments/code_in_comments-library.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ <h5>library code_in_comments</h5>
9494
<span class="no-break">
9595
test_package 0.0.1
9696
</span>
97-
&bull;
98-
<span class="copyright no-break">
99-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
100-
</span>
10197

10298
</footer>
10399

testing/test_package_docs/css/css-library.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ <h5>library css</h5>
104104
<span class="no-break">
105105
test_package 0.0.1
106106
</span>
107-
&bull;
108-
<span class="copyright no-break">
109-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
110-
</span>
111107

112108
</footer>
113109

testing/test_package_docs/css/theOnlyThingInTheLibrary.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ <h5>top-level property theOnlyThingInTheLibrary</h5>
7171
<span class="no-break">
7272
test_package 0.0.1
7373
</span>
74-
&bull;
75-
<span class="copyright no-break">
76-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
77-
</span>
7874

7975
</footer>
8076

testing/test_package_docs/ex/Animal-class.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,6 @@ <h5>enum Animal</h5>
269269
<span class="no-break">
270270
test_package 0.0.1
271271
</span>
272-
&bull;
273-
<span class="copyright no-break">
274-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
275-
</span>
276272

277273
</footer>
278274

testing/test_package_docs/ex/Animal/hashCode.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ <h5>property hashCode</h5>
8989
<span class="no-break">
9090
test_package 0.0.1
9191
</span>
92-
&bull;
93-
<span class="copyright no-break">
94-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
95-
</span>
9692

9793
</footer>
9894

testing/test_package_docs/ex/Animal/noSuchMethod.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ <h5>method noSuchMethod</h5>
8484
<span class="no-break">
8585
test_package 0.0.1
8686
</span>
87-
&bull;
88-
<span class="copyright no-break">
89-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
90-
</span>
9187

9288
</footer>
9389

testing/test_package_docs/ex/Animal/operator_equals.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ <h5>method operator ==</h5>
8484
<span class="no-break">
8585
test_package 0.0.1
8686
</span>
87-
&bull;
88-
<span class="copyright no-break">
89-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
90-
</span>
9187

9288
</footer>
9389

testing/test_package_docs/ex/Animal/runtimeType.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ <h5>property runtimeType</h5>
8989
<span class="no-break">
9090
test_package 0.0.1
9191
</span>
92-
&bull;
93-
<span class="copyright no-break">
94-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
95-
</span>
9692

9793
</footer>
9894

testing/test_package_docs/ex/Animal/toString.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ <h5>method toString</h5>
8484
<span class="no-break">
8585
test_package 0.0.1
8686
</span>
87-
&bull;
88-
<span class="copyright no-break">
89-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
90-
</span>
9187

9288
</footer>
9389

testing/test_package_docs/ex/Apple-class.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,6 @@ <h5>class Apple</h5>
374374
<span class="no-break">
375375
test_package 0.0.1
376376
</span>
377-
&bull;
378-
<span class="copyright no-break">
379-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
380-
</span>
381377

382378
</footer>
383379

testing/test_package_docs/ex/Apple/Apple.fromString.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ <h5>constructor Apple.fromString</h5>
9696
<span class="no-break">
9797
test_package 0.0.1
9898
</span>
99-
&bull;
100-
<span class="copyright no-break">
101-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
102-
</span>
10399

104100
</footer>
105101

testing/test_package_docs/ex/Apple/Apple.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ <h5>constructor Apple</h5>
9999
<span class="no-break">
100100
test_package 0.0.1
101101
</span>
102-
&bull;
103-
<span class="copyright no-break">
104-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
105-
</span>
106102

107103
</footer>
108104

testing/test_package_docs/ex/Apple/fieldWithTypedef.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ <h5>property fieldWithTypedef</h5>
100100
<span class="no-break">
101101
test_package 0.0.1
102102
</span>
103-
&bull;
104-
<span class="copyright no-break">
105-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
106-
</span>
107103

108104
</footer>
109105

testing/test_package_docs/ex/Apple/hashCode.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ <h5>property hashCode</h5>
100100
<span class="no-break">
101101
test_package 0.0.1
102102
</span>
103-
&bull;
104-
<span class="copyright no-break">
105-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
106-
</span>
107103

108104
</footer>
109105

testing/test_package_docs/ex/Apple/isGreaterThan.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method isGreaterThan</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

testing/test_package_docs/ex/Apple/m.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ <h5>property m</h5>
100100
<span class="no-break">
101101
test_package 0.0.1
102102
</span>
103-
&bull;
104-
<span class="copyright no-break">
105-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
106-
</span>
107103

108104
</footer>
109105

testing/test_package_docs/ex/Apple/m1.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ <h5>method m1</h5>
100100
<span class="no-break">
101101
test_package 0.0.1
102102
</span>
103-
&bull;
104-
<span class="copyright no-break">
105-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
106-
</span>
107103

108104
</footer>
109105

testing/test_package_docs/ex/Apple/methodWithTypedefParam.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method methodWithTypedefParam</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

testing/test_package_docs/ex/Apple/n-constant.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ <h5>property n</h5>
9797
<span class="no-break">
9898
test_package 0.0.1
9999
</span>
100-
&bull;
101-
<span class="copyright no-break">
102-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
103-
</span>
104100

105101
</footer>
106102

testing/test_package_docs/ex/Apple/noSuchMethod.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method noSuchMethod</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

testing/test_package_docs/ex/Apple/operator_equals.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method operator ==</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

testing/test_package_docs/ex/Apple/operator_multiply.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method operator *</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

testing/test_package_docs/ex/Apple/paramFromExportLib.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method paramFromExportLib</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

testing/test_package_docs/ex/Apple/printMsg.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ <h5>method printMsg</h5>
9595
<span class="no-break">
9696
test_package 0.0.1
9797
</span>
98-
&bull;
99-
<span class="copyright no-break">
100-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">cc license</a>
101-
</span>
10298

10399
</footer>
104100

0 commit comments

Comments
 (0)