When I create new custom types, I create them in the Prismic Web Interface and then copy all the JSON in the “Json Editor” tab, and paste that into a new file in my code project under /content_types/whatever.json
These are two scenarios I want to use:
A) Starting a new slice from scratch
B) Duplicating a provided library slice to make my own custom slice
Let’s take Duplicating a Slice to customise my own local version:
In my project I create a new slice:
$ npx prismic-cli sm --create-slice #==> Lets say we created ‘CallAction’
Replace the contents of my new Slice with the contents of the library provided CallToAction.
Login to Prismic and open content type that suports the new Slice.
How do I get the json data from CallToAction/model.json into the Prismic Writer Center?
At this stage it looks like I need to create the fields by dragging them in with the UI, but this seems wasteful of time and prone to variation and hence inacuracy.
What’s the best way to import the JSON into Prismic?