Removing cordova plugins from the project

前端 未结 14 2063
情书的邮戳
情书的邮戳 2020-12-12 15:50

Somehow in my app many of the cordova plugins are installed and because of that it requires access to almost everything - from my contacts to current location ( even though

14条回答
  •  借酒劲吻你
    2020-12-12 16:38

    I do it with this python one-liner:

    python -c "import subprocess as sp;[sp.call('cordova plugin rm ' + p.split()[0], shell=True) for p in sp.check_output('cordova plugin', shell=True).split('\n') if p]"
    

    Obviously it doesn't handle any sort of error conditions, but it gets the job done.

提交回复
热议问题