Cordova CLI, using Git, and saving plugins/platforms

后端 未结 2 908
南笙
南笙 2021-02-08 13:41

I\'m trying to figure out how to reconcile some Cordova + git \"best practices\" with what I think is reality, and I\'m hoping someone can shed some light on this for me.

<
2条回答
  •  旧时难觅i
    2021-02-08 14:00

    Cordova 4.3.0 + allows you to save and restore platforms and plugins. Saved information is stored in config.xml file. See v5.0.0 release notes and the official Cordova docs.

    You can save platforms and plugins using the --save option when you add them:

    cordova platforms add PLATFORM --save
    cordova plugins add PLUGIN --save
    

    Or you can save platforms and plugins that are currently added:

    cordova platforms save
    cordova plugins save
    

    By doing this there is no need to check in platforms or plugins into your code repository. They will be automatically restored based on your config.xml file when cordova prepare command is run.

提交回复
热议问题