Home>Article>Web Front-end> How to create a vuejs project in idea

How to create a vuejs project in idea

青灯夜游
青灯夜游 Original
2021-09-08 11:52:58 6253browse

Creation method: 1. Install Node; 2. Open the idea, click "Create New Project" - "Static Web", fill in the project name, and click "Finis"; 3. Open the Terminal of the idea and execute the command. Just install the vue scaffolding tool and initialize the vue project.

How to create a vuejs project in idea

The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.

1. Vue.js requires the foundation of Node.js

1. Download address: https://nodejs.org/en/ download/
(Follow the normal installation steps, the next step is the next step~)

2. Open cmd (win R) and enter the following command to check whether the installation is successful:

node -v npm -v

How to create a vuejs project in idea

2. Start building the project

1. Open Idea to create a new project

Create New Project > Static Web>Fill in the project name and select the saved workspace>Finis

How to create a vuejs project in idea

How to create a vuejs project in idea

##2. Install vue Scaffolding tool

·Open the Terminal of idea

How to create a vuejs project in idea

At this time, you need to modify the path of the Terminal first and change it to the cmd path of the local machine. ==>File->Settings (restart after modification) (otherwise there will be an error with npm and vue not being an internal command):

How to create a vuejs project in idea

After the modification, run the following Command


//安装淘宝镜像 npm i -g cnpm --registry=https://registry.npm.taobao.org

·Wait for the download to complete, continue to install the vue scaffolding tool, and continue to enter the following command in Terminal


npm i -g vue-cli

Test whether the installation is successful:


vue -V

After the scaffolding installation is completed, initialize the package structure and continue to enter


vue init webpack demo

demo as the name of the new project you created earlier. Initialization will set it up. You can refer to the settings here.

How to create a vuejs project in ideaAfter initialization is completed. Enter in Terminal:

cd demo npm install (or if using yarn :yarn) npm run dev

. After completion, you will be prompted which port can be accessed. This is now 8080

How to create a vuejs project in idea. Open the browser and enter: localhost: 8080, the following screen appears, and the simple demo is completed.

How to create a vuejs project in idea

Related recommendations: "

vue.js Tutorial"

The above is the detailed content of How to create a vuejs project in idea. 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