Skip to content

Instantly share code, notes, and snippets.

@kazoo0217
Created January 23, 2017 09:40
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 kazoo0217/38912e47a4147aa9dc98783455244993 to your computer and use it in GitHub Desktop.
Save kazoo0217/38912e47a4147aa9dc98783455244993 to your computer and use it in GitHub Desktop.
npm update

今日学んだこと。

npm パッケージの更新確認とを更新のしかた。

npm install --save-devnpm install --save でインストールしたパッケージは package.json に記述される。

  "devDependencies": {
    "browser-sync": "^2.18.6",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^3.1.1",
    "gulp-sass": "^3.1.0"
  },
  "dependencies": {
    "bootstrap-sass": "^3.3.7",
    "jquery": "^3.1.1",
    "jquery-smooth-scroll": "^2.1.2"
  }

こんな感じ。

パッケージの新バージョンが公開されているか確認するには、

$ npm outdated

を使うと良さそうだ。

$ npm update

で更新できる。
ただし、記述されているバージョンの互換性を保てる場合のみ更新する仕組みのようだ。

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