We will use Vue CLI.
Start by installing the CLI globally on your machine.
Open your terminal and run:
npm install -g @vue/cli
When it’s done, select your root project space and create your project:
Terminal
vue create my-project
The CLI will ask you to pick a preset of your choice and here, just make sure that Vuex is selected.
On macOS, navigate with your keyboard “up” and “down” arrows and select with the spacebar.
Terminal
After a short moment, your project is created. Then run:
cd my-project
npm run serve
Your project tree should look like this:
Project tree
Finally, remove the CLI dummy content until you see a blank page.
Now let’s focus on the store!
As a reminder, your store is registered globally inside main.js.
#javascript #web-development #vuejs #vuex