Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1e05bb5b
Unverified
Commit
1e05bb5b
authored
Jun 21, 2019
by
Dan Field
Committed by
GitHub
Jun 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make docs do less work/be less flaky (#34818)
parent
2e0d6f77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
dartdoc.dart
dev/tools/dartdoc.dart
+17
-9
No files found.
dev/tools/dartdoc.dart
View file @
1e05bb5b
...
@@ -50,7 +50,12 @@ Future<void> main(List<String> arguments) async {
...
@@ -50,7 +50,12 @@ Future<void> main(List<String> arguments) async {
final
StringBuffer
buf
=
StringBuffer
();
final
StringBuffer
buf
=
StringBuffer
();
buf
.
writeln
(
'name: Flutter'
);
buf
.
writeln
(
'name: Flutter'
);
buf
.
writeln
(
'homepage: https://flutter.dev'
);
buf
.
writeln
(
'homepage: https://flutter.dev'
);
buf
.
writeln
(
'version:
$version
'
);
// TODO(dnfield): We should make DartDoc able to avoid emitting this. If we
// use the real value here, every file will get marked as new instead of only
// files that have otherwise changed. Instead, we replace it dynamically using
// JavaScript so that fewer files get marked as changed.
// https://github.com/dart-lang/dartdoc/issues/1982
buf
.
writeln
(
'version: 0.0.0'
);
buf
.
writeln
(
'dependencies:'
);
buf
.
writeln
(
'dependencies:'
);
for
(
String
package
in
findPackageNames
())
{
for
(
String
package
in
findPackageNames
())
{
buf
.
writeln
(
'
$package
:'
);
buf
.
writeln
(
'
$package
:'
);
...
@@ -98,7 +103,7 @@ Future<void> main(List<String> arguments) async {
...
@@ -98,7 +103,7 @@ Future<void> main(List<String> arguments) async {
if
(
code
!=
0
)
if
(
code
!=
0
)
exit
(
code
);
exit
(
code
);
createFooter
(
'
$kDocsRoot
/lib/
footer.html'
);
createFooter
(
'
$kDocsRoot
/lib/
'
,
version
);
copyAssets
();
copyAssets
();
createSearchMetadata
(
'
$kDocsRoot
/lib/opensearch.xml'
,
'
$kDocsRoot
/doc/opensearch.xml'
);
createSearchMetadata
(
'
$kDocsRoot
/lib/opensearch.xml'
,
'
$kDocsRoot
/doc/opensearch.xml'
);
cleanOutSnippets
();
cleanOutSnippets
();
...
@@ -264,15 +269,18 @@ String gitRevision() {
...
@@ -264,15 +269,18 @@ String gitRevision() {
return
gitRevision
.
length
>
kGitRevisionLength
?
gitRevision
.
substring
(
0
,
kGitRevisionLength
)
:
gitRevision
;
return
gitRevision
.
length
>
kGitRevisionLength
?
gitRevision
.
substring
(
0
,
kGitRevisionLength
)
:
gitRevision
;
}
}
void
createFooter
(
String
footerPath
)
{
void
createFooter
(
String
footerPath
,
String
version
)
{
final
String
timestamp
=
DateFormat
(
'yyyy-MM-dd HH:mm'
).
format
(
DateTime
.
now
());
final
String
timestamp
=
DateFormat
(
'yyyy-MM-dd HH:mm'
).
format
(
DateTime
.
now
());
final
String
gitBranch
=
getBranchName
();
final
String
gitBranch
=
getBranchName
();
final
String
gitBranchOut
=
gitBranch
.
isEmpty
?
''
:
'• </span class="no-break">
$gitBranch
</span>'
;
final
String
gitBranchOut
=
gitBranch
.
isEmpty
?
''
:
'•
$gitBranch
'
;
File
(
'
${footerPath}
footer.html'
).
writeAsStringSync
(
'<script src="footer.js"></script>'
);
File
(
footerPath
).
writeAsStringSync
(<
String
>[
File
(
'
$kPublishRoot
/api/footer.js'
)
'• </span class="no-break">
$timestamp
<span>'
,
..
createSync
(
recursive:
true
)
'• </span class="no-break">
${gitRevision()}
</span>'
,
..
writeAsStringSync
(
'''var span = document.querySelector('
footer
>
span
');
gitBranchOut
].
join
(
' '
));
if (span) {
span.innerText = '
Flutter
$version
•
$timestamp
•
$
{
gitRevision
()}
$gitBranchOut
';
}
'''
);
}
}
/// Generates an OpenSearch XML description that can be used to add a custom
/// Generates an OpenSearch XML description that can be used to add a custom
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment