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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue CLI 3 Quick Start Guide

You're reading from   Vue CLI 3 Quick Start Guide Build and maintain Vue.js applications quickly with the standard CLI

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789950342
Length 200 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ajdin Imsirovic Ajdin Imsirovic
Author Profile Icon Ajdin Imsirovic
Ajdin Imsirovic
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introducing Vue CLI 3 2. Webpack in Vue CLI 3 FREE CHAPTER 3. Babel in Vue CLI 3 4. Testing in Vue CLI 3 5. Vue CLI 3 and Routing 6. Using ESLint and Prettier in Vue CLI 3 7. Improving CSS with SCSS 8. Deploying Vue CLI 3 Apps on GitHub Pages 9. Other Books You May Enjoy

Installing Vue CLI 3

We can install Vue CLI 3 with either npm or yarn. Since npm comes bundled with the Node.js installation, we'll use npm:

npm install -g @vue/cli --loglevel verbose

The preceding command installs Vue CLI 3 globally. That's what the -g flag is for. The @vue/cli syntax is what we use in Vue CLI 3, and --loglevel verbose will log out the details of our installation, which is very useful, especially on slower connections and slower machines, where sometimes we could start wondering whether our console froze. With --loglevel verbose, there's more clarity, which is always good.

Once done, let's double-check the Vue CLI version installed by running this command:

vue --version

Here are a few other useful commands that you should try in your console:

vue -h

Note that vue -h is an alias for vue --help. I'm using the former as it's easier to type.

Also, note that you can run the -h flag on each individual vue command, for example:

vue create -h
vue add -h
vue invoke -h
vue inspect -h
vue serve -h
vue build -h
vue ui -h
vue init -h
vue config -h
vue upgrade -h
vue info -h

Running any of the preceding lines will return the usage instructions for the specific command, a description of what it does, and the options (the flags) to append to each individual command. Obviously, the -h flag is a great way to explore the capabilities of Vue CLI, and to refresh your memory on the fly, if need be.

Next, we'll install our code editor of choice, VS Code.

lock icon The rest of the chapter is locked
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