Commonly Used Vue.js Commands

In this article, I will guide you with the Commonly Used Vue.js Commands. When creating a Vue.js app, the best way to create and run the application is to use Vue CLI. This is a command-line interface that allows us to choose from a range of tools. This article will teach us how to install vue.js cli and other useful commands to create a new project and install other required functionalities.

Prerequisites 

  • node.js installed

You can install the latest version of Node.js from here.

1. Vue Cli installation 

npm install -g @vue/cli

2. Vue.js version

vue --version

3. npm version

npm -v

4. node version

node -v

5. Upgrading CLI 

npm update -g @vue/cli

6. Create a Project

vue create demoa-app

7. Project creating options,

vue create --help

8. Create a Project Using the GUI

vue ui

9. Run the Project

npm run serve

10. Pre-Processors Saas

npm install -D sass-loader sass

11. Less

npm install -D less-loader less

12. Installing Plugins in an Existing Project, install eslint

vue add eslint

13.  CLI Service

npm run serve

14. Command to build on production

npm run build

Summary

This article taught us about commonly used commands in a Vue.js application.