当前位置:网站首页>手把手教你依赖管理
手把手教你依赖管理
2022-07-26 02:55:00 【壹小俊】
你知道什么是依赖吗?
软件工程是多人合作的结果,我们在开发软件的时候经常会使用一些别人编写好的,比较成熟的库。
比如,早期的前端开发用到了iQuery库,那么通常的做法是去官网下载一个最新版本的jQuery,然后放在自己本地的项目中。对于简单的前端项目来说,这样可以简单粗暴地达到目的。
但当项目越来越庞大,除了jQuery之外,你还会依赖一些其他的第三方库。比如Bootstrap与Chosen,这两个流行的前端库也都依赖jQuery,如果这些第三方库依赖的jQuery版本一致还好,但大多数情况并没有这么乐观:
你的项目依赖的jQuery版本是1.0.0,Bootstrap依赖的版本是1.1.0,而Chosen依赖的版本是120,看上去都是小版本不一致,一开始并没有发现任何问题,但是如果到后期发现不兼容,可能就为时已晚了。
所以,你需要在确定依赖之前,就把整个系统的依赖全部梳理一遍,保证每个依赖都不会有冲突问题。
你可能会质疑,这个前端工程师一定是初级的,事先都不会确认Bootstrap和Chosen依赖的版本吗,直接选择依赖iQuery100版本的不就行了?
这么说有一定道理,但是手工维护这些依赖是相当麻烦且容易出错的。随便找一个比较流行的开源软件,你都会发现它依赖了大量的第三方库,而这些第三方库又依赖着其他的第三方库,形成了一条十分复杂的依赖链。靠人工去解决这个依赖链一定会让你怀疑人生,因此你需要一些工具去管理项目的依赖。
你见过几种依赖管理工具?
其实,各大平台早已有一套自己的手段来解决上述的问题,仔细看
边栏推荐
猜你喜欢

Cycle and branch (I)

MySQL build websites data table

软件测试岗:阿里三面,幸好做足了准备,已拿offer

AMD64(x86_64)架构abi文档:
![[reading notes] user portrait methodology and engineering solutions](/img/5e/916853accf3a5af237f7f114855437.jpg)
[reading notes] user portrait methodology and engineering solutions

HLS Experiment 1 -- multiplier

规范自己debug的流程

Anti electronic ink screen st7302

图像识别(七)| 池化层是什么?有什么作用?

Personally test five efficient and practical ways to get rid of orders, and quickly collect them to help you quickly find high-quality objects!
随机推荐
eslint常见报错集合
U++ print information to screen and log
How to speed up matrix multiplication
Uni app cross domain configuration
Keyboardtraffic, a tool developed by myself to solve CTF USB keyboard traffic
Self-supervised learning method to solve the inverse problem of Fokker-Planck Equation
[introduction to C language] zzulioj 1006-1010
Manifold learning
微信公众号互助、开白群,小白报团取暖
Effectively solve the problem of garbled code when idea runs the web project (with detailed steps)
VOFA+ 串口调试助手
npm link的简单介绍及使用
High score technical document sharing of ink Sky Wheel - Database Security (48 in total)
Influence of middle tap change on ZVS oscillation circuit
MySQL build websites data table
[C Advanced] deeply explore the storage of data (in-depth analysis + interpretation of typical examples)
Study notes of pytorch deep learning practice: convolutional neural network (Advanced)
AMD64(x86_64)架构abi文档:中
18. Delete the penultimate node of the linked list
GAMES101复习:着色(Shading)、渲染管线