First, download the node.js / Download: http://nodejs.cn/download/
Select next:
The first installation options change:
Note: repair before the repair is problematic node.js / remove node.js removed from your computer
Then follow the prompts or select the next has been selected on the line (the middle of a check mark in the election, do not hit the check mark), and finally the installation is successful
The second step opens a terminal key Win + R
The key is to win between ctrl and alt
Then enter cmd
Click OK to the pop-up computer terminals as shown:
Then the input terminal
node -v
Check node is installed successfully, successful installation will display version
I have just installed the latest version of v12.13.0,
Then you start the installation vue scaffolding, and then enter in a terminal waiting for him to enter the automatic installation is successful
npm install --global vue-cli
The installation process a bit slow, be patient (Note: global is a global installed vue-cil)
Input Terminal:
vue -V
View version scaffolding
The version number appears, since scaffolding installation is complete,
The third step, the overall installation webpack
Next, in a terminal mounted webpack:
npm install --global webpack
(Note: As long as global is global installed)
Enter the end of the installation
webpack -V
Check whether the installation was successful
Finally, create a project vue
Enter in a terminal:
vue init webpack my-project
my-project is to create a project name
① prompt followed by the project name
② Item Description
③ author (you can enter your own name, you can also empty)
④vue building, generally select the first press Return
⑤ mounting vue-router
⑥ whether ESLint to lint your code ( regulation code used , pay attention to this one novice must choose no, type n and then press Enter)
⑦ setting unit tests
⑧ select a test runner
jest: (Jest was released by the Facebook open source, based on Jasmine's JavaScript unit testing framework)
karma and mocha :( project will run in a variety of browsers and define the test module)
none (configure it yourself) :( customize your project)
⑨ Set e2e test
Do you want to use npm install ⑩ After creating a project
Yes, use NPM: Use npm
Yes, use Yarn:使用yarn
No, I will handle that myself :( own custom)
Enter all the way on the line, (note that Article VI, depending on your individual circumstances, the novice best selection n), begin creating project
There are two tips to create a successful post
First, follow the path to find your project folder
After finding a space in the terminal type cd drag a folder onto the terminal,
Also can follow the path of their own input, hit Enter, you will enter the specified folder
Then enter
npm run start
Enter,
Usually HTTP: // localhost: 8080 , if port number occupied will automatically use the port number is not occupied, is your dependent
Finally input, carriage return
Figure: A new project to build a better vue