We now have a youtube channel. Subscribe!

Vue.js | Environment Setup

Vue.js Environment Setup

Hello folks! welcome back to a new edition of our Vue.js tutorial. in this tutorial, we will be discussing about the various techniques to install Vue.js into our machines.

There are many techniques to install Vue.js to our machines. Some of these techniques on how to do the installation is discussed in this tutorial.

Using the <script> tag directly in HTML file

      <script type = "text/javascript" src = "vue.min.js"></script>

Go to the home site of Vue.js and download Vue.js as per need. There are two versions - development version and production version. Development version isn't minimized, but the production version is minimized as shown in the following screenshot. The development version helps with warning and debug mode during the development of the project.

Using CDN

We can also start using Vue.js file from the CDN library. The link https://unpkg.com/Vue will give the latest version of View.js. Vue.js is also offered on jsDelivr. We can host the files at our end, and get started with Vue.js development.

Using NPM

For large scale applications with Vue.js, it is recommended to install making use of the npm package. It comes with Browserify and Webpack along with other necessarily tools, which help with the development. Following is the command to install using npm -

npm  install vue

Using CLI Command Line

Vue.js provide CLI to install the Vue and get started with the server activation. To install via CLI, we need to have CLI installed which is done using the following command.

npm install --global vue-cli

Once done, it displays the CLI version of the Vue.js. It takes few minutes to conclude the Installation.

+ vue-cli@2.8.2
added 965 packages in 355.414s

Following below is the command to create the project using Webpack.

vue init webpack myproject

To get started, use the following command.

cd myproject
npm install
npm run dev

Once we execute npm run dev, it starts the server and provides the url for display to be seen in the web browser which is as shown in the screenshot -

The project structure via CLI looks like the following.

Alright guys! This is where we are going to be rounding up for this tutorial. In our next tutorial, we will be discussing about Vue.js Introduction.

Feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.
© 2023 ‧ WebDesignTutorialz. All rights reserved. Developed by Jago Desain