WeChat Mini Program Development History - 01 Use of npm in Mini Programs

It is more casual to record the various control APIs encountered in the development. After all, the front-end level is really too poor. . . .

————————————————————————————————————————

1. Use of npm

emmmm This is the first time I know that npm is written in cmd, and I always thought it was written in development tools, such as vs code.

#Taobao update mirror
npm install -g cnpm --registry=https://registry.npm.taobao.org

Enter the root of the applet and create package.jsona folder

npm init -y

Initialization ( important )

npm install @vant/weapp -S --production

————————July 1, 21:10:44, 2020———————
The installation of vant has been failing, calling the Taobao mirror

npm config set registry https://registry.npm.taobao.org

———————————————————————————

tools -> build npm

Local settings check the use of npm modules
insert image description here

Two, spit out a big slot

Yesterday, I wanted to host the code git on a whim. When I connected to the local area and created a new warehouse according to the online tutorial, I had a heart before uploading the project (of course, the heart may be biased towards the nostril soybean.jpg), so I first uploaded a folder to try. , after success, init the project directly, and then according to the practice of pulling before push, the local file was directly overwritten...covered... At that time, my heart collapsed, although I found the previous backend file from the local history of idea, But the front desk code is all gone...all gone...me! ! ! How miserable! ! ! !
Next, the front end starts from scratch,,,, just record it,,, by the way,,, me! ! ! How miserable! ! ! !
Lessons learned when operating on the entire project! Be sure to back up! ! ! !

Guess you like

Origin blog.csdn.net/qq_16253859/article/details/106698187