Add Slice Machine to existing project with no libs?

Have existing Nuxt apps and want to add Slice Machine clean without vue-essential-slices.

The prismic-cli sm command has options to choose a lib but no option to not choose one. None should be an option.

Would it be possible to provide docs on this? Also would love to hear from power users in similar situation. Want to be able to —setup then —create-slice with confidence and no external libs, css, etc. Just that sweet SliceZone component and nuxt-sm.

3 Likes

Hey @jmetros, none should be an option indeed, I’ll add it to our team todo.
In the meantime, this is how you can get going:

  • npx create-nuxt-app my-app && cd $_
  • npx prismic-cli@beta sm --setup
  • yarn uninstall vue-essential-slices
  • remove the library from sm.json

To use your own slice:

  • create a component at slices/CallToAction/index.js and take slice as prop
  • copy-paste this code to /pages/:uid.vue
  • create a page on Prismic
  • your own slice should be displayed at /:uid!

Hope this helps, let me know!

1 Like

This issue has been closed due to inactivity.