Skip to content

Instantly share code, notes, and snippets.

@llccing
Created November 20, 2017 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llccing/023d2d4865c8b9284fc25408287c660f to your computer and use it in GitHub Desktop.
Save llccing/023d2d4865c8b9284fc25408287c660f to your computer and use it in GitHub Desktop.
  • package.json
{
  "name": "koa2",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "start": "node bin/www",
    "dev": "./node_modules/.bin/nodemon bin/www",
    "prd": "pm2 start bin/www",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "debug": "^2.6.3",
    "koa": "^2.2.0",
    "koa-bodyparser": "^3.2.0",
    "koa-convert": "^1.2.0",
    "koa-json": "^2.0.2",
    "koa-logger": "^2.0.1",
    "koa-onerror": "^1.2.1",
    "koa-router": "^7.1.1",
    "koa-static": "^3.0.0",
    "koa-views": "^5.2.1",
    "pug": "^2.0.0-rc.1"
  },
  "devDependencies": {
    "nodemon": "^1.8.1"
  }
}

这个文件中"^"表示的是匹配大版本号的任意一个版本,例如 ^2.2.0 会匹配 2.x.x

还有一种情况是 ~2.3.0,会匹配2.3.x,更小版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment