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

JavaScript
npm install -g @vue/cli

2. Vue.js version

JavaScript
vue --version

3. npm version

JavaScript
npm -v

4. node version

JavaScript
node -v

5. Upgrading CLI

JavaScript
npm update -g @vue/cli

6. Create a Project

JavaScript
vue create demoa-app

7. Project creating options,

JavaScript
vue create --help

8. Create a Project Using the GUI

JavaScript
vue ui

9. Run the Project

JavaScript
npm run serve

10. Pre-Processors Saas

JavaScript
npm install -D sass-loader sass

11. Less

JavaScript
npm install -D less-loader less

12. Installing Plugins in an Existing Project, install eslint

JavaScript
vue add eslint

13. CLI Service

JavaScript
npm run serve

14. Command to build on production

JavaScript
npm run build

Summary

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