1

[Developer] How does Sketch Beta's Library works?

2 years ago from , UI Designer at Try Consultoria e Pesquisas

I've been using Sketch Beta with Libraries for a few weeks and I love it. But now I need a little help from some developer friends. Let me explain...

I'm designing a system that's going to be used by two brands. Before the Libraries, I used brand.ai to reapply styles to every file of the system. If I had a file A for brand 1, I could click Sync and the file A would got the brand 2 colors/symbols/etc.

So, with Sketch Beta, every symbol is linked to Library 1, which has brand 1 colors and fonts. I made a Library 2 with different fonts and colors for brand 2, now I need to relink my file A to the new Library - which has the same symbol names and organization (everything is the same, but the colors and fonts).

I know text styles and colors aren't synced with Libraries, I still use Brand.ai for that.

Is there a simple way to do that I didn't see yet? Does any developer know the structure behind those meta and documents JSON? I understand that I could just re-link to the new LibraryName and LibraryID through the JSON inside Sketch files, but I tried to figure it out, never successful. Every time I stiched the file together trying to use the Library 2 info, and the Sketch file wouldn't open again.