Skip to content

Commit eed4ffb

Browse files
authored
[Feature] support idiom for icon (#39)
* Added convenient extension method to XcodeExport module * Make `icons` command to support device idiom * Removed individualScales * Updated parseNameAndIdiom param * Added `dark` to FileContents initializers * Removed singleScale case and updated ImagePack type to struct * Added scale to FileContents initializers * Update variables naming * Added Scale enum case for fixing export result for svg assets * Added test method for exporting iOS images * Update export method and clean up code * Updated XcodeIconsExporter and test cases * Added missing @ symbol * Fixed AssetPair export issue * Updated Example app figma-export naming regular expression to support idiom * Moved properties out of flatMap * Updated iOS example assets * Simplify create TemplateProperties
1 parent b1f1394 commit eed4ffb

32 files changed

+550
-420
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "ic24Profile.pdf"
6+
},
7+
{
8+
"idiom" : "ipad",
9+
"filename" : "ic24Profile~ipad.pdf"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
},
16+
"properties" : {
17+
"template-rendering-intent" : "template"
18+
}
19+
}
Binary file not shown.
Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,88 @@
11
{
22
"images" : [
33
{
4-
"filename" : "[email protected]",
54
"idiom" : "universal",
6-
"scale" : "3x"
5+
"scale" : "1x",
6+
"filename" : "[email protected]"
77
},
88
{
9-
"filename" : "[email protected]",
109
"idiom" : "universal",
11-
"scale" : "1x"
10+
"scale" : "2x",
11+
"filename" : "[email protected]"
1212
},
1313
{
14-
"filename" : "[email protected]",
1514
"idiom" : "universal",
16-
"scale" : "2x"
15+
"scale" : "3x",
16+
"filename" : "[email protected]"
17+
},
18+
{
19+
"idiom" : "ipad",
20+
"scale" : "1x",
21+
"filename" : "[email protected]"
1722
},
1823
{
24+
"idiom" : "ipad",
25+
"scale" : "2x",
26+
"filename" : "[email protected]"
27+
},
28+
{
29+
"idiom" : "ipad",
1930
"appearances" : [
2031
{
2132
"appearance" : "luminosity",
2233
"value" : "dark"
2334
}
2435
],
25-
"filename" : "[email protected]",
26-
"idiom" : "universal",
36+
"filename" : "[email protected]",
37+
"scale" : "1x"
38+
},
39+
{
40+
"idiom" : "ipad",
41+
"appearances" : [
42+
{
43+
"appearance" : "luminosity",
44+
"value" : "dark"
45+
}
46+
],
47+
"filename" : "[email protected]",
2748
"scale" : "2x"
2849
},
2950
{
51+
"idiom" : "universal",
3052
"appearances" : [
3153
{
3254
"appearance" : "luminosity",
3355
"value" : "dark"
3456
}
3557
],
3658
"filename" : "[email protected]",
37-
"idiom" : "universal",
3859
"scale" : "1x"
3960
},
4061
{
62+
"idiom" : "universal",
4163
"appearances" : [
4264
{
4365
"appearance" : "luminosity",
4466
"value" : "dark"
4567
}
4668
],
47-
"filename" : "[email protected]",
69+
"filename" : "[email protected]",
70+
"scale" : "2x"
71+
},
72+
{
4873
"idiom" : "universal",
74+
"appearances" : [
75+
{
76+
"appearance" : "luminosity",
77+
"value" : "dark"
78+
}
79+
],
80+
"filename" : "[email protected]",
4981
"scale" : "3x"
5082
}
5183
],
5284
"info" : {
53-
"author" : "xcode",
54-
"version" : 1
85+
"version" : 1,
86+
"author" : "xcode"
5587
}
5688
}
6.06 KB
Loading
13 KB
Loading
16.2 KB
Loading
49.5 KB
Loading
Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,88 @@
11
{
22
"images" : [
33
{
4-
"filename" : "[email protected]",
54
"idiom" : "universal",
6-
"scale" : "3x"
5+
"scale" : "1x",
6+
"filename" : "[email protected]"
77
},
88
{
9-
"filename" : "[email protected]",
109
"idiom" : "universal",
11-
"scale" : "1x"
10+
"scale" : "2x",
11+
"filename" : "[email protected]"
1212
},
1313
{
14-
"filename" : "[email protected]",
1514
"idiom" : "universal",
16-
"scale" : "2x"
15+
"scale" : "3x",
16+
"filename" : "[email protected]"
17+
},
18+
{
19+
"idiom" : "ipad",
20+
"scale" : "1x",
21+
"filename" : "[email protected]"
1722
},
1823
{
24+
"idiom" : "ipad",
25+
"scale" : "2x",
26+
"filename" : "[email protected]"
27+
},
28+
{
29+
"idiom" : "ipad",
1930
"appearances" : [
2031
{
2132
"appearance" : "luminosity",
2233
"value" : "dark"
2334
}
2435
],
25-
"filename" : "[email protected]",
26-
"idiom" : "universal",
27-
"scale" : "3x"
36+
"filename" : "[email protected]",
37+
"scale" : "1x"
2838
},
2939
{
40+
"idiom" : "ipad",
3041
"appearances" : [
3142
{
3243
"appearance" : "luminosity",
3344
"value" : "dark"
3445
}
3546
],
36-
"filename" : "[email protected]",
37-
"idiom" : "universal",
47+
"filename" : "[email protected]",
3848
"scale" : "2x"
3949
},
4050
{
51+
"idiom" : "universal",
4152
"appearances" : [
4253
{
4354
"appearance" : "luminosity",
4455
"value" : "dark"
4556
}
4657
],
4758
"filename" : "[email protected]",
48-
"idiom" : "universal",
4959
"scale" : "1x"
60+
},
61+
{
62+
"idiom" : "universal",
63+
"appearances" : [
64+
{
65+
"appearance" : "luminosity",
66+
"value" : "dark"
67+
}
68+
],
69+
"filename" : "[email protected]",
70+
"scale" : "2x"
71+
},
72+
{
73+
"idiom" : "universal",
74+
"appearances" : [
75+
{
76+
"appearance" : "luminosity",
77+
"value" : "dark"
78+
}
79+
],
80+
"filename" : "[email protected]",
81+
"scale" : "3x"
5082
}
5183
],
5284
"info" : {
53-
"author" : "xcode",
54-
"version" : 1
85+
"version" : 1,
86+
"author" : "xcode"
5587
}
5688
}
4.77 KB
Loading

0 commit comments

Comments
 (0)