About: recreate repository and "Custom Types" automatically using local project

Good afternoon

Hello everyone

Who can help

I executed the following command where the theme was downloaded, the repository was created, and the "Custom Types" was created

prismic theme --theme-url https://github.com/prismicio/reactjs-starter --conf /src/prismic-configuration.js --folder prismicio-reactjs

I accessed the repository and deleted it, I would like to know how do I recreate the repository and "Custom Types" automatically, since I already have the project with "Custom Types" in my local environment

Hello Marcio, welcome to the Prismic community forum!

It’s really easy to do, you just need to paste the JSON of the custom types in a new repo and pass the name of that new repo to your project configuration (you can find these files in the custom_types folder at the root of your project). Follow these steps:

That should be it, create a document, run your project and everything should look good!

If you need any further help let us know

Hello, thanks for interacting

I would like to do the same automation that is done when the command "prismic theme" is used, which in this case already creates the repository and custom_types automatically, that is, without having to do it manually in the prismic dashboard.

Is there a command that does this, or a library?

Hey!

If I understood correctly, you’d like to recreate the same steps that you did when you first ran the command, is that right? If that is correct, you’ll need to run the command again, this will create a new repo, with those Custom types and automatically connect it to your project.

prismic theme --theme-url https://github.com/prismicio/reactjs-starter --conf /src/prismic-configuration.js --folder prismicio-reactjs

That’s how you do it if you want to start all over again.
If you rather use the project that you already have in your local, then the steps I shared with you in my first response is the way to go.

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.