Home > Development Tools > VSCode > body text

How to use vscode to open an existing vue project

王林
Release: 2019-12-12 16:34:17
Original
13438 people have browsed it

How to use vscode to open an existing vue project

Installing the plug-in

1. Installation of the vetur plug-in

This plug-in is a highlighting plug-in for the basic syntax of vue files. Enter vetur in the plug-in window and click to install the plug-in. After installation, click File->Preferences->Settings to open the settings interface, and add configuration

"emmet.syntaxProfiles": {
  "vue-html": "html",
  "vue": "html"
}
Copy after login

2 on the right side of the settings interface. , Installation of eslint plug-in

eslint intelligent error detection plug-in plays a great role in specific development and can help us find errors in time. As for installation, also open the plug-in extension window and enter eslint and click to install the plug-in. After installation, you also need to configure it. Configure it in the same place as the vetur plug-in.

"eslint.validate": [
        "javascript",
        "javascriptreact",
        "html",
        "vue"
    ],

 "eslint.options": {
        "plugins": ["html"]
}
Copy after login

vetur and eslint plug-ins are configured As shown in the figure below:

How to use vscode to open an existing vue project

Import the project and compile

1. Import the project

from github Download the vuestic-admin project (https://github.com/epicmaxco/vuestic-admin), pull it to the local area, open VSCode, click on the file, open the folder, import the project, and enter # in the console terminal ##npm installAdd package dependencies

How to use vscode to open an existing vue project

If npm is not installed, please install npm first.

2. Run the project

Also execute

npm run dev at the end to start running the project. This command will automatically run the project on the browser. The results are as follows As shown, the configuration is successful.

How to use vscode to open an existing vue project

Recommended related articles and tutorials:

vscode tutorial

The above is the detailed content of How to use vscode to open an existing vue project. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!