Home>Article>Development Tools> How to use vscode to open an existing vue project

How to use vscode to open an existing vue project

王林
王林 Original
2019-12-12 16:34:17 13552browse

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. Enterveturin 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" }

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 entereslintand 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"] }

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 devat 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!

Statement:
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