Update cordova plugins in one command

前端 未结 14 790
故里飘歌
故里飘歌 2020-12-04 06:34

I am wondering is there an easier way to update cordova plugin?

I googled, found a hook (@ year 2013), but this is not 100% what I want.

I know I can do this

14条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 07:12

    If you install the third party package:

    npm i cordova-check-plugins
    

    You can then run a simple command of

    cordova-check-plugins --update=auto --force
    

    Keep in mind forcing anything always comes with potential risks of breaking changes.

    As other answers have stated, the connecting NPM packages that manage these plugins also require a consequent update when updating the plugins, so now you can check them with:

    npm outdated
    

    And then sweeping update them with

    npm update
    

    Now tentatively serve your app again and check all of the things that have potentially gone awry from breaking changes. The joy of software development! :)

提交回复
热议问题