In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about which environments vue needs to install. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Vue requires the Node environment to be installed. The operation of vue depends on node's npm management tools, and node can be used to package and deploy, parse vue single-file components, parse each vue module, start the test server localhost, manage vue-router, vue-resource and other plug-ins.
The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.
What environments need to be prepared and configured for Vue project development?
I believe that when many people first learn the framework of vue, when they first build the development environment, they will encounter some large and small pits. I built it once when I studied angular before, but when I built it for the second time a month later, there was some confusion, so I want to sort it out today.
Vue is now in the front end, is one of the more commonly used frameworks for front-end engineers, he and angular have some similarities, so partners who have used angular, it should not be too difficult to learn vue
One: download and install node environment
Be sure to download node.js before building the vue development environment
The operation of vue depends on the management tools of node's npm.
And the use of node is more convenient, packaging deployment, parsing vue single file components, parsing each vue module, put together, etc., start the test server localhost, to help you manage these plug-ins vue-router,vue-resource. So usually we will use the Vue+node method, which is convenient and convenient.
Node can be downloaded from the official website or Chinese website, according to your computer choice is 32 or 64, URL: http://nodejs.cn
Second: after downloading node, open the docs management tool to see if node has been successfully installed. Enter node-v and enter, and the version number of node will be output.
This is already a successful installation. Since it is very slow to use npm in China, we recommend using Taobao npm image here.
Taobao's cnpm command management tool can replace the default npm management tool: $npm install-g cnpm-- registry= https://registry.npm.taobao.org
Third, after the installation of the Taobao image is successful, we can use the vue-cli scaffolding globally, enter the command: cnpm install-- global vue-cli enter; verify whether the installation is successful, enter vue in the command, give the vue information, and indicate the success of the installation
4: after building the scaffolding, we will start to build a new project. At this time, I suggest that we should try not to install it on disk C, because the file downloaded by vue is relatively large. If you want to change the disk, enter D: enter and you can change the disk directly.
Then we start to create a new project input command: vue init webpack my-project enter, my-project is the name of my own folder, is a webpack-based project, type and then enter until there is whether to install vue-router
We need to use this in the project, so enter y to enter
The following will appear whether we need js syntax testing. If we don't need this for the time being, we can enter no directly, and then we can enter no directly, which we don't need for the time being.
Four: the folder has been downloaded, now you can enter the folder, enter: cd my-project enter, because the various templates are interdependent, so now we have to install dependencies
Enter command: cnpm install
Five: after it has been installed, it is time to test whether the downloaded template can work properly. Type: npm run dev enter on the command line.
8080 is the default port. If you want to access it, you can open the default template by typing localhost:8080 in the browser.
In this way, our vue basic project has been installed and running, and has stepped into the door of vue.
The above is the scaffolding method of vue-cli2.0. Now it has been upgraded to 4.0, and the project construction method is more simple and convenient. Enter the command:
Npm install-g @ vue/cli, download the scaffolding tool, and enter the command: vue create folder name after a successful download
Then select the configuration, the first default is the default configuration, the second is manual configuration, manual configuration depends on your own project needs, configuration required files (but usually I choose the default configuration for convenience, ), and then wait to create a folder
After the file is created successfully, enter the command: npm run serve directly, and you can run the project!
Thank you for reading! This is the end of the article on "which environments need to be installed in vue". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.