当前位置:网站首页>手把手教你依赖管理
手把手教你依赖管理
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版本的不就行了?
这么说有一定道理,但是手工维护这些依赖是相当麻烦且容易出错的。随便找一个比较流行的开源软件,你都会发现它依赖了大量的第三方库,而这些第三方库又依赖着其他的第三方库,形成了一条十分复杂的依赖链。靠人工去解决这个依赖链一定会让你怀疑人生,因此你需要一些工具去管理项目的依赖。
你见过几种依赖管理工具?
其实,各大平台早已有一套自己的手段来解决上述的问题,仔细看
边栏推荐
- ShardingSphere数据分片
- Neo4j import CSV data error: neo4j load CSV error: couldn't load the external resource
- [introduction to C language] zzulioj 1006-1010
- Self-supervised learning method to solve the inverse problem of Fokker-Planck Equation
- Three years of software testing experience, salary has been stuck at 10K, how to improve and develop automated testing?
- Simply use MySQL index
- My friend took 25koffer as soon as he learned automation test. When will my function test end?
- Literature speed reading | in the face of danger, anxious people run faster?
- 1.软件测试-----软件测试的基本概念
- massCode 一款优秀的开源代码片段管理器
猜你喜欢

MySQL建Websites数据表

ES6高级-利用构造函数继承父类属性

Image recognition (VI) | activation function

Cycle and branch (I)

Arthas' dynamic load class (retransform)

Binary search 33. search rotation sort array

Self-supervised learning method to solve the inverse problem of Fokker-Planck Equation

Chapter 3 business function development (delete clues)

MySQL build websites data table

从各大APP年度报告看用户画像——标签,比你更懂你自己
随机推荐
移位距离和假设的应用
【C进阶】深入探索数据的存储(深度剖析+典例解读)
Usage of fuser and lsof
How can users create data tables on Web pages and store them in the database
The LAAS protocol elephant of defi 2.0 is the key to revitalizing the development of defi track
Article setting top
Binary search 33. search rotation sort array
26 points that must be paid attention to for stability test
获取时分秒
ES6高级-利用原型对象继承方法
HLS实验一--乘法器
U++ common type conversion and common forms and proxies of lambda
[translation] safety. Value of sboms
Personally test five efficient and practical ways to get rid of orders, and quickly collect them to help you quickly find high-quality objects!
Recorded target detection NMS (non maximum suppression)
npm link的简单介绍及使用
Programming example of STM32 state machine -- fully automatic washing machine (Part 1)
My friend took 25koffer as soon as he learned automation test. When will my function test end?
【方向盘】启动命令和IDEA如何传递:VM参数、命令行参数、系统参数、环境变量参数、main方法参数
Application of shift distance and hypothesis