Sweet contest, Prismic Team! It's definitely the little boost I needed to get off my butt and give Prismic a shot, and SliceMachine in particular looks really interesting!
Thought I'd keep a little log of my progress as I go through the motions, and document successes/failures for others who may be going through a similar journey. :)
Day #1:
I do a lot of Nuxt myself, so that seems like the best choice for me. The provided starters didn't work for me, and I'm actually hoping to use TailwindCSS, so I'm starting from my own clean slate create-nuxt-app
generated app.
The "step-by-step" version of the getting started directions are actually quite good, and I preferred them to the quick start as they go a little deeper into the how's and why's of Slices and SliceMachine:
Something that tripped me up at first, is that at the moment, you cannot use the stable prismic-cli, and instead must use 3.8.3-beta.0 or greater. The documentation actually mentions this in a few places...
You will need the 3.8.3-beta.0 version of the Prismic CLI, check by running: prismic --version.
You can go to that version by running the following command:
yarn global add prismic-cli@3.8.3-beta.0
or
npm install --global prismic-cli@3.8.3-beta.0
If you run into any problems try uninstalling and reinstalling the CLI.
...but not actually at any point in the quick start, so it was easy to miss. Without using the beta, slice creation will fail as the scripts try to ping the cms with the wrong api address, so make sure you get it right!
Also worth pointing out that the starter projects (i believe), the cli package is listed as an internal dependencies, so you may not need to yarn global add
it, and/or you might run into problems going through the documentation which sometimes tells you to f.ex prismic sm...
and sometimes tells you to yarn prismic sm....
— just be aware which setup you've got and stick with the right choice for you.
The canonical set of useful commands that will go into my README.md:
# Create a slice
$ prismic sm --create-slice
# List all slices
$ prismic sm -ls
# Run Storybook, defaults to localhost:3003
## https://www.slicemachine.dev/documentation/adding-a-storybook/
$ yarn run storybook
# Run SliceMachine, defaults to localhost:9999
$ prismic sm --develop
Some of the documentation mentions that the developers are aware that running Nuxt, Storybook, and SliceMachine all at once in different terminals is a bit awkward, and I agree with that. It's not an insane ask — but streamlining the process would be nice, though I think it's far down my "requested features" list so far.