Using npm to prepare the project for Vue/Vuex

To use npm, you need to have Node.js installed. You can find information on how to install Node.js at https://nodejs.org/.

The first step to make a Vue/Vuex project is creating a directory and initializing it with npm. Open a console and type the following commands:

mkdir notes-appcd notes-appnpm init

The npm init command will ask you some questions. Each question has a default value that is normally a good choice. You can just press Enter for each question. After that, it will create a package.json file with the values you provided. We will use this file to save project dependencies and to create some commands that are useful for the app's development.

Let's begin by installing webpack and its ...

Get Vuex Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.