Cordova 5.0.0: Which files should I commit to git?

后端 未结 7 763
南方客
南方客 2021-01-30 02:47

I use Cordova 5.0.0 and i have the following project structure:

MyProject
    - hooks
    - platforms
    - plugins
    - resources
    - www
    - config.xml


        
相关标签:
7条回答
  • 2021-01-30 03:43

    You can ignore the platforms and plugins directories as long as you haven't added any custom code in them.

    When adding plugins and platforms add --save to the command. e.g.

    cordova platform add ios@3.8.0 --save
    

    or

    cordova plugin add cordova-plugin-device --save
    

    This will save a record of the plugins and platforms you use to your config.xml file. When you run cordova prepare or cordova build all of your plugins and platforms listed in config.xml will be installed if they haven't been already.

    You can also specify a platform in prepare and build. So if you are on your Mac, you can check out the git repository and run cordova prepare ios to install just the ios platform and plugins.

    0 讨论(0)
提交回复
热议问题