Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Forms with Vue.js

You're reading from   Building Forms with Vue.js Patterns for building and scaling complex forms with great UX

Arrow left icon
Product type Paperback
Published in Oct 2019
Publisher Packt
ISBN-13 9781839213335
Length 108 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Marina Mosti Hernandez Mosti Marina Mosti Hernandez Mosti
Author Profile Icon Marina Mosti Hernandez Mosti
Marina Mosti Hernandez Mosti
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Setting up the Demo Project FREE CHAPTER 2. A Form in its Simplest Form 3. Creating Reusable Form Components 4. Input Masks with v-mask 5. Input Validation with Vuelidate 6. Moving to a Global State with Vuex 7. Creating Schema-Driven Forms 8. Other Books You May Enjoy

Installing Vue CLI onto our computer

At the time of writing, the Vue CLI has the requirements of Node version 8.9 or above (8.11.0+ is recommended), so we need to make sure you have that set up on your development computer first.

To check if you already have it installed, perform the following steps:

  1. Open up a Terminal (also known as a command line!)
  2. Execute the node -v command

If you get back an output with a version tag, then you have it installed, and you can skip ahead.

If you don't have Node already, head over to the following link in your browser: nodejs.org.

You should be presented with a Home screen and two big green download buttons. We will be using the one labeled Current, as shown in the following screenshot:

So, go ahead and click on the button and follow the installation instructions for your own OS.

Once the installation is complete, verify that everything is working correctly:

  1. Open your Terminal
  2. Execute the node -v command

You should get an output similar to v12.2.0, verifying that the node has correctly been installed to your system.

To actually get Vue CLI installed to our system, however, we still need to make use of a package manager.

Now, when you installed Node, you actually got a copy of npm installed on your system for free. You can verify this by typing npm -v in your Terminal, and, as before, you will get a version number as output.

Be aware that the Vue CLI requires Node version 8.9 or above (8.11.0+ recommended) at the time of writing, but make sure you check the following link for the exact version number for the moment you follow this book: vuejs.org/guide/installation.html.

Finally, it is time to actually get things up and running. Fire up your Terminal once again, and run the following command:

> npm install --global @vue/cli

The Terminal will go ahead and download all of the required files onto your computer and set them up in a globally accessible path so you can use this CLI tool anywhere on your computer. Neat, right?

Note the --global flag on this command. What this means is that you're installing this package globally on your computer. In short, this means that you will be able to use the commands from anywhere inside your filesystem, without having to navigate to a specific folder.

For future reference, you can also use the shorthand for --global, which is simply -g.

Once more, let's check that everything was installed properly by running vue --version on the Terminal. You should get back the version number of Vue CLI.

Now that we have our CLI set up, we can start with creating our new project. Let's dive deeper into how to do this in the following section.

You have been reading a chapter from
Building Forms with Vue.js
Published in: Oct 2019
Publisher: Packt
ISBN-13: 9781839213335
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image