Closed phillysnow closed 3 years ago
To create a new project on the right cluster with the theme
command, we need to add a property: appCtx
in the theme command.
In https://github.com/prismicio/prismic-cli/blob/master/lib/commands/index.js
:
Inside the context of the theme command:
context: {
appCtx: 'slicemachine'
}
And then we need to figure out how to replace the different endpoints in a slicemachine project. The theme command wasn't meant for that in the beginning.
@arnaudlewis we would use --conf sm.json
to replace that endpoint and import the endpoint in to the nuxt.config
from there, no?
yes if we can, that would be perfect
@arnaudlewis On this branch, --conf sm.json
now seems to be working:
https://github.com/samlfair/nuxtjs-website/tree/smjson
The Prismic endpoint in nuxt.config.js
points to sm.json
, and the theme
command updates the endpoint in sm.json
just fine. The repo still doesn’t get put on the right cluster, but when I moved my repo to a SM cluster in Manage V2, prismic sm --create-slice
worked.
To test it out:
prismic theme --theme-url https://github.com/samlfair/nuxtjs-website/archive/smjson.zip --conf sm.json
yes @samlfair, someone from the dev team needs to add the line of code I specified in my first comment, but it's inside the CLI.
This is done on the latest beta of the CLI.
Can we update the CLI so that users are automatically added to the correct cluster so that we can use
prismic theme
with SM?