How do you uninstall all your bower packages?

前端 未结 8 1491
礼貌的吻别
礼貌的吻别 2021-01-30 06:09

Sometimes it\'s useful to rebuild an entire site and force bower to reinstall new versions of all the packages in bower.json.

However, there doesn\'t seem to be any way

8条回答
  •  一生所求
    2021-01-30 06:53

    Updated Answer

    If you're trying to update all of your packages, use

    $ bower update
    

    Original Answer

    Go to your bower.json file and remove all of the components, or libraries, that you want to uninstall from devDependencies.

    After you have removed the ones you want gone, execute -

    $ bower prune
    
    1. start with -

      "devDependencies": {
          "angular": "~1.2.15",
          "angular-ui-router": "~0.2.10",
          "moment": "~2.5.1"
      }
      
    2. remove angular references from file -

      "devDependencies": {
          "moment": "~2.5.1"
      }
      
    3. execute

      $ bower prune
      
    4. watch your angular dependencies get uninstalled

提交回复
热议问题