VUE release project instance explanation

After the project is completed, of course, it is not satisfied with running in our development environment. We can pack it onto the server, let everyone enjoy your work together.

So how do the Vue project packages, the new project directory usually has a readme.md file, which describes the procedure:

Herein this is Vue-CLI 3 . xi’s readMe.md file content in the project:

  # firstpage ## Project setup  

npm

### compiles and hot-reloads for development
   
NPM RUN SERVE
### compiles and minifies for production

npm run build
 ### Run Your Tests   
NPM Run Test

  NPM Run Lint  

### Customize ConfigurationSee [ConfiguraTion Reference] (https://cli.vuejs.org/config/).

Commonly used instructions, what we need One is:
   
This can be built into a dist directory with only static HTML and JS files inside.

NPM Run Build

Run the above command, you can see the root directory below after the operation is complete. A dist catalog:
  Open We can see an index.html, but you open it directly.  
Here you need to hosted it into a web container, such as IIS, Apache, Nginx, etc., interested children’s shoes can build one of the above and then upload the packaged catalog to look up.

This small item is actually a lot of defects, including login after login, verification of login when publishing articles, but this project is after all It is used to familiarize with the Vue frame. Therefore, if Yu Yu is not intended to spend too much effort on this project, letting it become a complete, concise, real and available blog system (in fact, half of the features have been completed), after all, this is introduced for novices. Multi-related factors, not well focus on how to use VUE. I believe that children’s shoes learned from the first step here have been able to write out a real blog system, except for the backend interface, but here we can use Postman’s MOCK function, and related tutorials in the series of articles.

Interfaces in all articles are Mock features from Postman.
SubsequentThe article will begin to practice how elegant write code. Good code will increase readability, reduce the communication cost of team collaboration, and can also enhance the maintenanceability, scalability, etc. of the project.

From the other hand, the code can be written better, why should it be written?


Be sure that the so-called code that must be ignored by the network is getting better, it is best to write only the level that he can understand, will become an indispensable medium-flow column.

This is not excellent, not survived, but is not responsible! ! !

Become a company’s medium-sized pillar, subject to departmental leaders and colleagues recognized or more excellent, not thinking, but to be real materials (not necessarily coding ability, such as good coordination and colleagues) The relationship can be made to lead the leadership, which can bring joy, technology improvement, etc. to the team.

It is not related to which line is going to make yourself better, not messy.

The code is spacious, the more difficult to communicate with others, how to progress? And other people of the team cannot read and maintain, how to maintain harmony and colleagues in the project? In the next interview, and the interviewer said that there was a system that only had yourself to maintain, how many means did you use to let colleagues can’t understand the code? So as used, it is really unfavorable. Vue发布项目实例讲解

Behind the middle flow of the column, but it is struggling after the end of the road. Such a behavior, who can trust you, which day is buried in the thunder to BOOM.

Therefore, if Yu Yu advocates and makes recommendations to you:

Responsible for his code and is responsible for himself.

From the perspective of personal:
You can make your code more readable, no longer afraid of history code

Convenient to communicate with others

Exercise your own thinking, every variable name, function name, file name thinking can make your own ideas clearer, every file exists, let yourself have a clearer recognition Know

Here recommended two books:

“Code neat”

“Reconstructing the design of existing code”

It is worth seeing.

The above is the content of all knowledge points introduced, thank you for reading and supporting Tumi Cloud.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment