为什么在 Bower 依赖项中的版本之前使用符号?
why use symbols before version in bower dependences ?
为什么在 bower 依赖项中使用“^”、“~”、“#”???版本之前的各个命令有什么区别??
例如:
"angular-aria": "~1.5.5",
"bootstrap-sass": "~3.3.6",
"angular-bootstrap": "^1.3.2",
"moment": "^2.13.0",
"rdash-ui": "#1.0.1",
来自package.json documentation, for more info please refer to http://semver.org/
- version 必须完全匹配版本
- >版本必须大于版本
- >=版本等
- <版本
- <=版本
- ~版本"Approximately equivalent to version" 参见 semver
- ^version "Compatible with version" 参见 semver
- 1.2.x 1.2.0、1.2.1 等,但不是 1.3.0
- http://...见下文'URLs as Dependencies'
- 星号 (*) 匹配任何版本
- ""(只是一个空字符串)与 *
相同
- version1 - version2 与 >=version1 <=version2 相同。
- 范围1 || range2 如果满足 range1 或 range2,则通过。
- git ...见下文'Git URLs as Dependencies'
- user/repo 见下文 'GitHub URLs'
- tag 标记并作为标签发布的特定版本参见 npm-tag
- path/path/path 请参阅下面的本地路径
为什么在 bower 依赖项中使用“^”、“~”、“#”???版本之前的各个命令有什么区别??
例如: "angular-aria": "~1.5.5", "bootstrap-sass": "~3.3.6", "angular-bootstrap": "^1.3.2", "moment": "^2.13.0", "rdash-ui": "#1.0.1",
来自package.json documentation, for more info please refer to http://semver.org/
- version 必须完全匹配版本
- >版本必须大于版本
- >=版本等
- <版本
- <=版本
- ~版本"Approximately equivalent to version" 参见 semver
- ^version "Compatible with version" 参见 semver
- 1.2.x 1.2.0、1.2.1 等,但不是 1.3.0
- http://...见下文'URLs as Dependencies'
- 星号 (*) 匹配任何版本
- ""(只是一个空字符串)与 * 相同
- version1 - version2 与 >=version1 <=version2 相同。
- 范围1 || range2 如果满足 range1 或 range2,则通过。
- git ...见下文'Git URLs as Dependencies'
- user/repo 见下文 'GitHub URLs'
- tag 标记并作为标签发布的特定版本参见 npm-tag
- path/path/path 请参阅下面的本地路径