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
db2ecf44
Unverified
Commit
db2ecf44
authored
Jul 30, 2020
by
Mehmet Fidanboylu
Committed by
GitHub
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose certain functions used when rolling Flutter (#62529)
parent
87ee003f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
update_icons.dart
dev/tools/update_icons.dart
+7
-5
No files found.
dev/tools/update_icons.dart
View file @
db2ecf44
...
...
@@ -174,17 +174,17 @@ void main(List<String> args) {
}
final
String
newCodepointsString
=
newCodepointsFile
.
readAsStringSync
();
final
Map
<
String
,
String
>
newTokenPairMap
=
_
stringToTokenPairMap
(
newCodepointsString
);
final
Map
<
String
,
String
>
newTokenPairMap
=
stringToTokenPairMap
(
newCodepointsString
);
final
String
oldCodepointsString
=
oldCodepointsFile
.
readAsStringSync
();
final
Map
<
String
,
String
>
oldTokenPairMap
=
_
stringToTokenPairMap
(
oldCodepointsString
);
final
Map
<
String
,
String
>
oldTokenPairMap
=
stringToTokenPairMap
(
oldCodepointsString
);
_testIsMapSuperset
(
newTokenPairMap
,
oldTokenPairMap
);
final
String
iconClassFileData
=
iconClassFile
.
readAsStringSync
();
stderr
.
writeln
(
'Generating new token pairs.'
);
final
String
newIconData
=
_
regenerateIconsFile
(
iconClassFileData
,
newTokenPairMap
);
final
String
newIconData
=
regenerateIconsFile
(
iconClassFileData
,
newTokenPairMap
);
if
(
argResults
[
_dryRunOption
]
as
bool
)
{
stdout
.
writeln
(
newIconData
);
...
...
@@ -204,7 +204,8 @@ ArgResults _handleArguments(List<String> args) {
return
argParser
.
parse
(
args
);
}
Map
<
String
,
String
>
_stringToTokenPairMap
(
String
codepointData
)
{
// Do not make this method private as it is used by g3 roll.
Map
<
String
,
String
>
stringToTokenPairMap
(
String
codepointData
)
{
final
Iterable
<
String
>
cleanData
=
LineSplitter
.
split
(
codepointData
)
.
map
((
String
line
)
=>
line
.
trim
())
.
where
((
String
line
)
=>
line
.
isNotEmpty
);
...
...
@@ -222,7 +223,8 @@ Map<String, String> _stringToTokenPairMap(String codepointData) {
return
pairs
;
}
String
_regenerateIconsFile
(
String
iconData
,
Map
<
String
,
String
>
tokenPairMap
)
{
// Do not make this method private as it is used by g3 roll.
String
regenerateIconsFile
(
String
iconData
,
Map
<
String
,
String
>
tokenPairMap
)
{
final
StringBuffer
buf
=
StringBuffer
();
bool
generating
=
false
;
for
(
final
String
line
in
LineSplitter
.
split
(
iconData
))
{
...
...
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