Vue Road learn of (a) - the establishment of Hello, World project

Vue Road learn of (a) - the establishment of Hello, World project

First, the search Vue Cli, into the official website

Enter Vue Cli official website after the pull down, saw a silent installation, you need to use the command npm, before learning when installed Node.js, so you can directly enter the installation instructions. npm install -g @vue/cli
This will take up 1G Cli probably a little more space C drive, my C drive is not enough space to install failed once, but again and out of direct command to reload, do not need to file before the deleted.

Second, create a Vue project

After installation is complete, you can Git Bash want to create a directory in the right position, or in the address bar, enter cmd, and then enter vue create my-projector enter vue uithe former is installed directly on the command line to ask questions, I am a beginner all the way to Y and enter on it .

Third, open the Vue project

Once created to see so many files and folders indicate look ignorant forced to find index.html directly open only to find a blank. In fact, I was too impatient, enter the correct approach should be open npm run serveto open the server, I use Apache, so after the last deployment is successful, enter http://localhost:8080/directly accessed (not really open Hello World)

Four, Notes

1, the first is the C drive before installation position it must be enough

2, followed by the environment, the need for certain conditions of the environment, such as servers, npm, etc.

3, and finally open the way Vue project, can not open the index.html directly! ! ! My friend said to function properly after use webpack packaged click index.html to open, but not learned webpack put it on the first place

Released four original articles · won praise 0 · Views 57

Guess you like

Origin blog.csdn.net/weixin_45611255/article/details/103244105