Run the Prismic Slice Machine command

Before you run the Slice Machine command, make sure you have the correct version of:

The basic Slice Machine command

prismic sm --setup

What does this command do?

This command does a lot of different things for you including:

  • It automatically connects our default Component Library and adds any necessary dependencies to use the tool. This is done by adding extra configurations to your nuxt.config.js file. You can see what exactly this does and how to configure this file manually here.
  • Adds the sm.json file with the default configuration.
  • Creates a Prismic repository, with a standard "Page" custom type. You will receive a confirmation email with a link to your new repository, or you can also go directly to your Dashboard.
  • Installs dependencies required by Slice Machine and the library you selected, like node-sass, sass-loader and vue-essential-slices.
  • Installs libraries to fetch and display Prismic data like @prismicio/client, @nuxtjs/prismic and nuxt-sm.

What is the Prismic repository?

This is where all the content for your project will be kept and where you can choose the content models (Slices) that will correspond to your components in the frontend of your project. Learn more about Prismic.