Please enable JavaScript.
Coggle requires JavaScript to display documents.
Check that sketchtool is available (Cleanup the destination and the temp…
Check that
sketchtool
is available
Cleanup the
destination
and the
temp
folders
Loop on every brand and its declared group of Sketch files
Get the
design tokens
values for this brand
Prepare the brand's Sketch files (unzipped) and get a list of them
Unzip the Sketch file
Update the Sketch JSON files adding a prefix to the exported assets layers when inside an experiment (detected via the "XP_" prefix in the page name)
Return an ordered list of Sketch unzipped folders
Read the Sketch JSON data in the files and store it in pre-defined objects
Get the (merged) list of Shared Styles objects
Get the (merged) list of Exported Assets objects
for every Sketch folder
parse the "document" and "meta" files
from "document" get metadata for the "shared styles" list
from "meta" + "pages" get metadata for the "assets" list
loop on every page and loop on every "exported" asset ("pagesAndArtboards")
store the layer data/informations and add extra metadata (size, source)
2 more items...
merge the lists of Shared Styles objects and the list of Assets objects
Generate the assets for the different platforms
Generate PDF for iOS
for every Sketch folder
create a clone/copy of the original Sketch folder, to read/update its JSON content
in the Sketch JSON files replace the Shared Styles color values with the brand-specific ones (read from the design tokens)
recompress the updated sketch folder to a Sketch file
1 more item...
for every exported asset
move the exported asset to its final folder
store the asset data in an object list of assets: asset name, file path, size, experiment/variant, etc.
generate the final output files
process the experiments and update the assets data/paths
2 more items...
Generate SVG/JSX for Mobile Web
for every Sketch folder
create a clone/copy of the original Sketch folder, to read/update its JSON content
in the Sketch JSON files replace the Shared Styles color values with the brand-specific ones (read from the design tokens)
recompress the updated sketch folder to a Sketch file
1 more item...
for every exported asset
update the SVG file replacing hex fill values with variable names (same as design tokens)
move the exported asset to its final folder
1 more item...
use cheerio to read the SVG DOM tree
1 more item...
convert the SVG file to a React component
generate the final output files
process the experiments and update the assets data/paths
2 more items...
Generate VectorDrawable for Android
for every Sketch folder
create a clone/copy of the original Sketch folder, to read/update its JSON content
in the Sketch JSON files replace the Shared Styles color values with the brand-specific ones (read from the design tokens)
in the Sketch JSON files for every layer replace the
winding-rule
property from "even-odd" to "non-zero"
recompress the updated sketch folder to a Sketch file
1 more item...
for every exported asset
generate the final output files
process the experiments and update the assets data/paths
2 more items...
update the SVG file replacing hex fill values with variable names (same as design tokens)
convert the SVG file to VectorDrawable
1 more item...
use cheerio to read the SVG DOM tree
1 more item...