vue-cli3 steps to quickly build project

Greatly, especially as microblogging piece hand, always assured assured the general said not launch vue3.0 within six months, and then while muffled zoom trick. vue-cli3 out for some time, but the memory is not too good, always need to find the degree of your mother when built, had to pick up some small record books himself.

Click here to view vue-cli3 the official website of the official documents , two small problems that require attention:

  1. More to the latest npm
  2. node >=8.9
vue create

Run command to quickly create project

vue create books
14110538-f94b447c7e0ddabe.png
figure 1

If you first created using vue-cli3, there will be the following two, if you choose to keep the records of last created to create a shortcut, it will appear first. Press the keyboard arrow keys to select a default (default) or manually (Manually), if you choose default, all the way down on the list Enter the implementation, where we choose the manual steps to complete the creation.

14110538-0c779d320cc41902.png
figure 2

Babe is selected by default and eslint, 此处空格键是选中与取消,A键是全选. Specifically the following can be selected (selection may be more router / vues / css / eslint) according to their activity:

TypeScript support the use of TypeScript writing source
Progressive Web App (PWA) Support PWA support.
Router supports vue-router.
Vuex support vuex.
CSS Pre-processors support CSS preprocessor.
Linter / Formatter support code style checking and formatting.
Unit Testing support unit testing.
E2E Testing supports E2E testing.

14110538-28fd16929cc43281.png
image 3

Here choose to pre-css, gives the stylus / less / scss are three eradicate personal preference, I generally use the stylus. Followed by eslint specification of choice is given three choices, in general we will choose the last one, the last one as to why Amway, can refer to a good answer: use ESLint + Prettier to unify the front-end code style .

14110538-dc4aacbfacca1cca.png
Figure 4

After a carriage return and will give you a choice, grammar checking. The first is to check the time saved, and the second time to commit the fix is ​​detected, a first general choice here.

14110538-3d4427d47141c9f5.png
Figure 5

The next place you will be prompted to save the configuration file, the first one is separate folder location, and the second is in the package.json.

14110538-cae665e2bfe41e7b.png
Image 6

Next you will be prompted to save these configurations directly into the next, depending on how you choose here.

14110538-5ace4fdc09e3729a.png
Figure 7

After waiting for download we have successfully completed the creation of the project, then follow the prompts to go to successfully open the project.

Guess you like

Origin blog.csdn.net/weixin_33681778/article/details/91036417