CNode

package.json dependencies ^ 表示什么

Cceclinux发布于12 年前最后回复12 年前7 回复43239 浏览0 收藏
{
  "name": "application-name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "dependencies": {
    "express": "3.4.7",
    "ejs": "*",
    "validator": "*",
    "connect-flash": "~0.1.1",
    "mongoose": "*",
    "express-partials": "~0.2.0",
    "blueimp-file-upload-node": "~2.1.0",
    "gulp": "3.5.6",
    "tiny-lr": "0.0.5",
    "gulp-livereload": "~1.2.0",
    "node-static": "~0.7.3",
    "imagemagick": "^0.1.3",
    "formidable": "^1.0.14",
    "colors": "^0.6.2",
    "gulp-nodemon": "^1.0.2"
  },
  "devDependencies": {
    "gulp-htmltidy": "0.0.1"
  }
}

我的package.jsondependencies出现了很多**^**带头的字符,官方文档也没有,不知道是什么东西。。 我用npm install后发现imagemagick下的版本还是0.1.3,感觉不是非的意思 求解释,谢谢~

查看回复

回复 (7)

A
aphantee#1·12 年前

和rails配置文件好像,我猜是版本要大于caret后面的数字的意思

Z
zengwenbing#3·12 年前

~应该是代表这个版本后的所有版本

C
ceclinux#4·12 年前
P
Pana#6·12 年前

收藏了, 涨知识

L
leapon#7·12 年前

^1.2.3 := >=1.2.3-0 <2.0.0-0 "Compatible with 1.2.3". When using caret operators, anything from the specified version (including prerelease) will be supported up to, but not including, the next major version (or its prereleases). 1.5.1 will satisfy ^1.2.3, while 1.2.2 and 2.0.0-beta will not.

参与回复
登录后即可参与回复。登录