In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to create a vue project. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Install npm
1. Check node, it is not installed here to download the latest version of the installation.
2. Check that npm,node comes with npm but not the latest version. You need to update the command: npm install-g npm
Install vue scaffolding
1. There will be network problems when downloading in China. It is recommended to download Taobao image and configure image: npm install-g cnpm-- registry= https://registry.npm.taobao.org.
2. Install vue scaffolding with cnpm: cnpm I-g @ vue/cli (where I is the abbreviation for Install installation and g is the global abbreviation for global).
Create a vue project
1. Use scaffolding to create a vue project: vue create test (test is the project name)
2. Select the third custom item to add:
Default ([Vue 3] babel, eslint): a project for vue3 that contains only the js compiler babel and the code testing tool eslint.
Default ([Vue 2] babel, eslint): a project for vue2 that contains only the js compiler babel and the code testing tool eslint.
Manually select features: custom add selection function.
3. Select the configuration. For general projects, check the following options:
Babel:js compiler
Superset of Typescript:js
Progressive Web App Support: a progressive web application
Routing of Router:vue
State Management of Vuex:vue
Preprocessor of CSS Pre-processors:css
Linter/Formatter: code style detection and formatting (you can use this constraint if your code is not very standard, or you don't have to choose according to your own style)
Unit Testing: unit test
E2E Testing: end-to-end testing
4. Select vue3 (according to your own needs)
5. The route is in history mode, and enter y:
6. Select the first CSS preprocessor:
7. Select the third standard configuration:
8. Select the first one and prompt an error when writing the code:
9. The configuration storage options for Babel, ESLint, etc., are stored in package.json. Select the second option:
10. Save the setting to demo, and the next time you create the project, there will be an extra demo option, which can be used directly without having to configure it again:
11. Click enter and wait for the creation to be completed:
Start the project
1. Cd to the project directory: cd test. Enter the startup command: npm run serve
2. Open the link to start the project:
Thank you for reading! This is the end of this article on "how to create a vue Project". 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.