Building Vue environment under windows

write for yourself

1. Download and install node according to your own model, http://nodejs.cn/download/ installation is always the default option.

    Verify that your installation was successful:

        Open the cmd of the computer and enter the command: node -v Enter

            If the installation is successful, the version number of node will appear

                 

2. Install the mirror cnpm, enter in cmd: npm install -g cnpm --registry= https://registry.npm.taobao.org press  Enter


I don't know how to get rid of this watermark, but it didn't cover any text.


I went to the Internet to check this paragraph, and said that the warning must be reduced to remove the warning, but I saw that the text that jumped out after cmd meant that the installation was successful, so I ignored the warning and continued.

3 Install the scaffolding of vue-cli, still enter in cmd: cnpm install -g vue-cli press Enter, waiting for installation

            

Don't worry, there will be a bunch of stuff until the pop-up command lets you type it again

        Verification: Enter in cmd: vue 

            If successful, the version information will jump out          

 

Create a new project:

1. Now create a new folder on your computer to store your project,

    Example: my existing location D:\1demo\VUE\test (do not need Chinese characters)

 Because it is the d drive, so I first open the d drive


Next enter the path


Start creating project input


The first-project in this article is the name of my project. You can fill it in according to your own mood. The grammar is the previous part.


These are the questions you'll be asked next

ps: The fourth question is a choice for you, you can use the up and down arrows to choose, generally choose the first one

The following questions are answered yes or no according to the needs, if you feel troublesome, you can always enter (including the fourth question)

    vue-router routing plugin ESLint code inspection tool unit test unit test nightwatch test framework

After this step, you can go to see the newly created folder, first-project has appeared

2. Open the folder in cmd


3. Download dependencies


4. Run the project


will appear after success


Open URL in browser


success.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324502975&siteId=291194637