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
6d84e4aa
Commit
6d84e4aa
authored
Jan 11, 2017
by
Adam Barth
Committed by
GitHub
Jan 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Flutter to use the latest dartdoc (#7438)
Now that dart-lang/dartdoc#1236 is fixed.
parent
8f6aefa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
docs.sh
dev/bots/docs.sh
+23
-3
dartdoc.dart
dev/tools/dartdoc.dart
+13
-7
No files found.
dev/bots/docs.sh
View file @
6d84e4aa
...
...
@@ -2,15 +2,35 @@
set
-e
# Install dartdoc.
# Versions after 0.9.7+1 suffer from https://github.com/dart-lang/dartdoc/issues/1236
# so are we pinned to this old version until that bug is fixed.
pub global activate dartdoc 0.9.7+1
pub global activate dartdoc 0.9.9
# This script generates a unified doc set, and creates
# a custom index.html, placing everything into dev/docs/doc
(
cd
dev/tools
;
pub get
)
FLUTTER_ROOT
=
$PWD
dart dev/tools/dartdoc.dart
# Smoke test the docs to make sure we have all the major kinds of things.
if
[[
!
-f
dev/docs/doc/flutter/widgets/Widget/Widget.html
]]
;
then
echo
'Failed to find documentation for Widget class. Are the docs complete?'
exit
1
fi
if
[[
!
-f
dev/docs/doc/flutter/dart-io/File/File.html
]]
;
then
echo
'Failed to find documentation for File class. Are the docs complete?'
exit
1
fi
if
[[
!
-f
dev/docs/doc/flutter/dart-ui/Canvas/drawRect.html
]]
;
then
echo
'Failed to find documentation for Canvas.drawRect. Are the docs complete?'
exit
1
fi
if
[[
!
-f
dev/docs/doc/flutter/flutter_test/WidgetTester/pumpWidget.html
]]
;
then
echo
'Failed to find documentation for WidgetTester.pumpWidget. Are the docs complete?'
exit
1
fi
# Ensure google webmaster tools can verify our site.
cp
dev/docs/google2ed1af765c529f57.html dev/docs/doc
...
...
dev/tools/dartdoc.dart
View file @
6d84e4aa
...
...
@@ -62,16 +62,14 @@ dependencies:
'global'
,
'run'
,
'dartdoc'
,
'--header'
,
'styles.html'
,
'--header'
,
'analytics.html'
,
'--dart-sdk'
,
'../../bin/cache/dart-sdk'
,
'--exclude'
,
'temp_doc'
,
'--favicon=favicon.ico'
,
'--use-categories'
];
for
(
String
libraryRef
in
libraryRefs
())
{
String
name
=
path
.
basename
(
libraryRef
);
for
(
String
libraryRef
in
libraryRefs
(
diskPath:
true
))
{
args
.
add
(
'--include-external'
);
args
.
add
(
name
.
substring
(
0
,
name
.
length
-
5
)
);
args
.
add
(
libraryRef
);
}
process
=
await
Process
.
start
(
'pub'
,
args
,
workingDirectory:
'dev/docs'
);
...
...
@@ -145,6 +143,7 @@ List<String> findPackageNames() {
return
findPackages
().
map
((
Directory
dir
)
=>
path
.
basename
(
dir
.
path
)).
toList
();
}
/// Finds all packages in the Flutter SDK
List
<
Directory
>
findPackages
()
{
return
new
Directory
(
'packages'
)
.
listSync
()
...
...
@@ -158,12 +157,19 @@ List<Directory> findPackages() {
.
toList
();
}
Iterable
<
String
>
libraryRefs
()
sync
*
{
/// Returns import or on-disk paths for all libraries in the Flutter SDK.
///
/// diskPath toggles between import paths vs. disk paths.
Iterable
<
String
>
libraryRefs
({
bool
diskPath:
false
})
sync
*
{
for
(
Directory
dir
in
findPackages
())
{
String
dirName
=
path
.
basename
(
dir
.
path
);
for
(
FileSystemEntity
file
in
new
Directory
(
'
${dir.path}
/lib'
).
listSync
())
{
if
(
file
is
File
&&
file
.
path
.
endsWith
(
'.dart'
))
yield
'
$dirName
/
${path.basename(file.path)}
'
;
if
(
file
is
File
&&
file
.
path
.
endsWith
(
'.dart'
))
{
if
(
diskPath
)
yield
'
$dirName
/lib/
${path.basename(file.path)}
'
;
else
yield
'
$dirName
/
${path.basename(file.path)}
'
;
}
}
}
}
...
...
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