@@ -21,53 +21,56 @@ await Promise.all(
21
21
) ;
22
22
23
23
Promise . all (
24
- Object . entries ( flavors ) . flatMap ( async ( [ identifier , { name, colors } ] ) => {
25
- const fname = identifier . charAt ( 0 ) . toUpperCase ( ) + identifier . slice ( 1 ) ;
24
+ Object . entries ( flavors ) . flatMap (
25
+ async ( [ identifier , { name : nameWithAccent , colors } ] ) => {
26
+ const nameWithoutAccent = identifier . charAt ( 0 ) . toUpperCase ( ) +
27
+ identifier . slice ( 1 ) ;
26
28
27
- await Deno . writeFile (
28
- join ( ROOT , `ase/${ fname } .ase` ) ,
29
- generateAse ( fname , colors ) ,
30
- ) ;
31
- await Deno . writeFile (
32
- join ( ROOT , `png/${ fname } .png` ) ,
33
- generatePng ( fname , colors ) ,
34
- ) ;
35
- await Deno . writeFile (
36
- join ( ROOT , `procreate/${ fname } .swatches` ) ,
37
- await generateProcreate ( fname , colors ) ,
38
- ) ;
39
- await Deno . writeTextFile (
40
- join ( ROOT , `gimp/${ fname } .gpl` ) ,
41
- generateGimp ( fname , colors ) ,
42
- ) ;
43
- await Deno . writeTextFile (
44
- join ( ROOT , `sip/${ fname } .palette` ) ,
45
- generateSip ( fname , colors ) ,
46
- ) ;
47
-
48
- if ( Deno . env . get ( "COMPILE_APPLE_COLOR_LIST" ) === "1" ) {
49
- const clrJson = join ( ROOT , `clr/${ fname } .json` ) ;
29
+ await Deno . writeFile (
30
+ join ( ROOT , `ase/Catppuccin ${ nameWithoutAccent } .ase` ) ,
31
+ generateAse ( nameWithoutAccent , colors ) ,
32
+ ) ;
33
+ await Deno . writeFile (
34
+ join ( ROOT , `png/Catppuccin ${ nameWithoutAccent } .png` ) ,
35
+ generatePng ( nameWithoutAccent , colors ) ,
36
+ ) ;
37
+ await Deno . writeFile (
38
+ join ( ROOT , `procreate/Catppuccin ${ nameWithoutAccent } .swatches` ) ,
39
+ await generateProcreate ( nameWithoutAccent , colors ) ,
40
+ ) ;
41
+ await Deno . writeTextFile (
42
+ join ( ROOT , `gimp/Catppuccin ${ nameWithoutAccent } .gpl` ) ,
43
+ generateGimp ( nameWithoutAccent , colors ) ,
44
+ ) ;
50
45
await Deno . writeTextFile (
51
- clrJson ,
52
- generateClrJson ( fname , colors ) ,
46
+ join ( ROOT , `sip/Catppuccin ${ nameWithoutAccent } .palette` ) ,
47
+ generateSip ( nameWithoutAccent , colors ) ,
53
48
) ;
54
49
55
- const cmd = new Deno . Command ( "swift" , {
56
- args : [
57
- join ( import . meta . dirname ! , "./builders/palettes/json-to-clr.swift" ) ,
50
+ if ( Deno . env . get ( "COMPILE_APPLE_COLOR_LIST" ) === "1" ) {
51
+ const clrJson = join ( ROOT , `clr/ ${ nameWithoutAccent } .json` ) ;
52
+ await Deno . writeTextFile (
58
53
clrJson ,
59
- join ( ROOT , `clr/${ name } .clr` ) ,
60
- ] ,
61
- } ) ;
62
- const { code, stderr, stdout } = await cmd . output ( ) ;
63
- const td = new TextDecoder ( ) ;
64
- if ( code === 0 ) {
65
- console . log ( td . decode ( stdout ) . trim ( ) ) ;
66
- } else {
67
- throw new Error ( td . decode ( stderr ) ) ;
68
- }
54
+ generateClrJson ( nameWithoutAccent , colors ) ,
55
+ ) ;
56
+
57
+ const cmd = new Deno . Command ( "swift" , {
58
+ args : [
59
+ join ( import . meta. dirname ! , "./builders/palettes/json-to-clr.swift" ) ,
60
+ clrJson ,
61
+ join ( ROOT , `clr/Catppuccin ${ nameWithAccent } .clr` ) ,
62
+ ] ,
63
+ } ) ;
64
+ const { code, stderr, stdout } = await cmd . output ( ) ;
65
+ const td = new TextDecoder ( ) ;
66
+ if ( code === 0 ) {
67
+ console . log ( td . decode ( stdout ) . trim ( ) ) ;
68
+ } else {
69
+ throw new Error ( td . decode ( stderr ) ) ;
70
+ }
69
71
70
- await Deno . remove ( clrJson ) ;
71
- }
72
- } ) ,
72
+ await Deno . remove ( clrJson ) ;
73
+ }
74
+ } ,
75
+ ) ,
73
76
) . then ( ( ) => Deno . exit ( 0 ) ) ;
0 commit comments