当前位置:网站首页>Package What is the function of JSON file? What do the inside ^ angle brackets and ~ tilde mean?

Package What is the function of JSON file? What do the inside ^ angle brackets and ~ tilde mean?

2022-07-05 01:06:00 Wei Bo-

1、package.json What is the function of documents ?

package.json It is the description file of the package , There are mainly the following 3 A role :

(1) It is equivalent to a document description of your local project .
(2) Allows you to specify the node The version of the package .
(3) It's easier to build your project , Easy to share with others .

2、package.json In file ^ Angle brackets and ~ What does the wave sign mean ?

according to package The second rule about the role of documents is : This file specifies the node The version of the package , stay package.json Inside dependencies There are two symbols in front of the version number of the dependent package , One is ~, One is ^.

(1)^ Express : Match the latest large version, such as 1.0.2 Will match to 1.x.x, But does not include 2.x.x
(2)~ Express : Match the latest small version, such as ~1.0.2 Will match 1.0.x edition , But don't match 1.1.0

PS: Software version number x.y.z The meaning of :
z : It means some small ones bugfix, change z Of ,
y : Indicates some major version changes , For example, some API The change of
x : It indicates some design changes and module reconfiguration , It will be upgraded x Version number

原网站

版权声明
本文为[Wei Bo-]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050103552973.html