How to update each dependency in package.json to the latest version?

前端 未结 30 2844
清歌不尽
清歌不尽 2020-11-22 08:01

I copied package.json from another project and now want to bump all of the dependencies to their latest versions since this is a fresh project and I don\'t mind

30条回答
  •  有刺的猬
    2020-11-22 08:19

    Alternative is

    "dependencies":{
        "foo" : ">=1.4.5"
    }
    

    everytime you use npm update , it automatically update to the latest version. For more version syntax, you may check here: https://www.npmjs.org/doc/misc/semver.html

提交回复
热议问题