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
e2db0253
Commit
e2db0253
authored
Jul 23, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #250 from abarth/material_package
Move Material Design Icons to their own package
parents
2bccb189
18921498
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
87 deletions
+2
-87
BUILD.gn
packages/flutter/BUILD.gn
+0
-29
.gitignore
packages/flutter/lib/assets/.gitignore
+0
-1
material-design-icons.sha1
packages/flutter/lib/assets/material-design-icons.sha1
+0
-1
download_material_design_icons
packages/flutter/lib/download_material_design_icons
+0
-55
icon.dart
packages/flutter/lib/widgets/icon.dart
+1
-1
pubspec.yaml
packages/flutter/pubspec.yaml
+1
-0
No files found.
packages/flutter/BUILD.gn
View file @
e2db0253
...
...
@@ -15,14 +15,11 @@ dart_pkg("sky") {
"lib/animation/forces.dart",
"lib/animation/scroll_behavior.dart",
"lib/animation/timeline.dart",
"lib/assets/.gitignore",
"lib/assets/material-design-icons.sha1",
"lib/base/debug.dart",
"lib/base/hit_test.dart",
"lib/base/lerp.dart",
"lib/base/node.dart",
"lib/base/scheduler.dart",
"lib/download_material_design_icons",
"lib/editing/editable_string.dart",
"lib/editing/editable_text.dart",
"lib/editing/input.dart",
...
...
@@ -115,34 +112,8 @@ dart_pkg("sky") {
]
}
action("material_design_icons") {
source_file = "lib/assets/material-design-icons"
target_file = "$root_gen_dir/dart-pkg/sky/lib/assets/material-design-icons"
stamp = "$target_gen_dir/material_design_icons_linked"
sources = [
"lib/assets/material-design-icons.sha1",
]
outputs = [
stamp,
]
script = "//sky/build/symlink.py"
args = [
rebase_path(source_file, root_build_dir),
rebase_path(target_file, root_build_dir),
"--touch",
rebase_path(stamp, root_build_dir),
]
deps = [
":sky",
]
}
group("sdk") {
deps = [
":sky",
":material_design_icons",
]
}
packages/flutter/lib/assets/.gitignore
deleted
100644 → 0
View file @
2bccb189
material-design-icons
packages/flutter/lib/assets/material-design-icons.sha1
deleted
100644 → 0
View file @
2bccb189
74927f91069e6540e40983acb5eb40072704fd2f
packages/flutter/lib/download_material_design_icons
deleted
100755 → 0
View file @
2bccb189
#!/usr/bin/env python
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import
os
import
shutil
import
subprocess
import
sys
import
urllib2
def
main
():
sky_lib_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
assets_dir
=
os
.
path
.
join
(
sky_lib_dir
,
'assets'
)
icons_dir
=
os
.
path
.
join
(
assets_dir
,
'material-design-icons'
)
existing_sha1_path
=
os
.
path
.
join
(
icons_dir
,
'material-design-icons.sha1'
)
existing_sha1
=
None
if
os
.
path
.
isfile
(
existing_sha1_path
):
with
open
(
existing_sha1_path
,
'r'
)
as
f
:
existing_sha1
=
f
.
read
()
sha1_path
=
os
.
path
.
join
(
assets_dir
,
'material-design-icons.sha1'
)
with
open
(
sha1_path
,
'r'
)
as
f
:
sha1
=
f
.
read
()
if
existing_sha1
==
sha1
:
return
print
"Downloading missing material design icons"
tgz_path
=
os
.
path
.
join
(
assets_dir
,
'material-design-icons.tgz'
)
url
=
'https://storage.googleapis.com/mojo/material-design-icons/
%
s'
%
sha1
response
=
urllib2
.
urlopen
(
url
)
with
open
(
tgz_path
,
'wb'
)
as
f
:
f
.
write
(
response
.
read
())
shutil
.
rmtree
(
icons_dir
,
ignore_errors
=
True
)
output_path
=
os
.
path
.
join
(
assets_dir
,
tgz_path
)
subprocess
.
call
([
'tar'
,
'-xzf'
,
output_path
,
'-C'
,
assets_dir
])
subprocess
.
call
([
'cp'
,
sha1_path
,
icons_dir
])
os
.
unlink
(
tgz_path
)
if
__name__
==
'__main__'
:
sys
.
exit
(
main
())
packages/flutter/lib/widgets/icon.dart
View file @
e2db0253
...
...
@@ -41,7 +41,7 @@ class IconTheme extends Inherited {
AssetBundle
_initIconBundle
(
)
{
if
(
rootBundle
!=
null
)
return
rootBundle
;
const
String
_kAssetBase
=
'/packages/
sky/assets/material-design-
icons/'
;
const
String
_kAssetBase
=
'/packages/
material_design_icons/
icons/'
;
return
new
NetworkAssetBundle
(
Uri
.
base
.
resolve
(
_kAssetBase
));
}
...
...
packages/flutter/pubspec.yaml
View file @
e2db0253
...
...
@@ -5,6 +5,7 @@ description: A framework for writing Sky applications
homepage
:
https://github.com/domokit/sky_engine/tree/master/sky/sdk
dependencies
:
cassowary
:
^0.1.7
material_design_icons
:
^0.0.1
mojo_services
:
^0.0.15
mojo
:
^0.0.17
mojom
:
^0.0.17
...
...
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