designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

How to handle multiple JSON files in Temavelgeren

Open Barsnes opened this issue 1 year ago • 1 comments

Since we have added border radius to Temavelgeren, we need to figure out how we can best allow users to copy contents. The JSON we give the user should be split between multiple files, for colors, typography and sizes.

image

Possible solutions:

  • Generate a zip file containing all json files
  • Copy each file individually
  • Give users a CLI command they can run

I think it would be best to give a zip file, so both developers and designers can easily drop the files where they need them. I believe this should be possible to do with a server action.

Barsnes avatar Jun 24 '24 08:06 Barsnes

Agreed.

I think options 1 and 3 are possible and those we should aim for.

We can use the same approach @unekinn started with in the init script with having a portable way of generating the design-tokens files given x input.

Then we can use them in both terminal and apps.

I will start looking into this in #2197.

... Possible solutions:

  • Generate a zip file containing all json files
  • Copy each file individually
  • Give users a CLI command they can run

I think it would be best to give a zip file, so both developers and designers can easily drop the files where they need them. I believe this should be possible to do with a server action.

mimarz avatar Aug 05 '24 09:08 mimarz

This is solved 🎉 #2290

mrosvik avatar Sep 19 '24 07:09 mrosvik