What is the purpose of fetch.json file inside cordova plugins folder?

rtf_leg

File fetch.json created inside plugins folder after cordova plugin add executed first time. This file also modified each time I add/remove plugins.

  • What purpose of this file exactly?
  • What tools use this file, when and why?
  • Is there a way to restore plugins using fetch.json (try not to place plugins into repositiory)?
  • Where can I find some docs about content of this file?

Content of fetch.json:

{
    "com.phonegap.plugins.PushPlugin": {
        "source": {
            "type": "git",
            "url": "https://github.com/phonegap-build/PushPlugin.git",
            "subdir": "."
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-file": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-file"
        },
        "is_top_level": true,
        "variables": {}
    }
}
jujule

Looks like this file tracks installed plugins, their origin and revision, like npm package.json dependencies does, but for plugman. I guess and hope this should migrate to the npm standard soon.

This file is updated on cordova add/remove plugins (https://github.com/apache/cordova-lib/blob/e4e5904619bab05705d62bce92a4c4cd0d45bb82/cordova-lib/src/cordova/plugin.js#L272)

When we cordova prepare, cordova reads plugin list from plugins/ios.json (for ios), then, for each one :

  • get the plugin infos from plugins/fetch.json
  • try to find the plugin locally

looks like its not possible to restore plugins with this file. My workflow is :

  • define plugins dependencies in config.xml
  • remote platforms and empty plugins folder
  • run cordova platform add xxx

this will refetch plugins as defined in config.xml

Looks like the only doc is the source code : https://github.com/apache/cordova-lib/search?utf8=%E2%9C%93&q=fetch

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

cordova.file.dataDirectory not creating file inside the app folder

From Dev

What is the purpose for the resource folder in Maven?

From Dev

Using Cordova Plugins in Ionic Inside a Controller

From Dev

What is the purpose of > in a CSS file

From Dev

What is the purpose of CRX file?

From Dev

What is the purpose of queueCount inside VkDeviceQueueCreateInfo?

From Dev

What is the purpose of taco.json in Apache Cordova Visual Studio 2015 project?

From Dev

Manage cordova plugins with npm + package.json

From Dev

Cordova : what kind of cordova plugins should be removed in release time?

From Dev

What purpose does the Public folder serve

From Dev

What is the purpose of .bin folder in node_modules?

From Dev

What purpose does the Public folder serve

From Dev

What is the purpose of the Common Files folder in Program Files?

From Dev

What is the purpose of the 'metal' folder in a programming language?

From Dev

What is the purpose of derived data folder in Xcode?

From Dev

no .xcodeproj file in cordova app folder

From Dev

cordova-3.4.0 doesn't copy plugins to platform folder

From Dev

what is the purpose of tsconfig.json?

From Dev

what is the purpose of using JSON in android?

From Dev

Cordova not recognized as external command inside project folder?

From Dev

What is the purpose of schema.json in angular 2? Why we provide it in angular-cli.json file?

From Dev

Adding stylesheet from plugins folder to front end, inside of plugin

From Dev

Eclipse plugin dev: make bundle to explode inside `plugins` folder

From Dev

cordova : what is the use of platform_www folder?

From Dev

What's the purpose of the "merges" and "runs" tags in a Cordova plugin?

From Dev

What's the purpose of the "merges" and "runs" tags in a Cordova plugin?

From Dev

What is the Equivalent of Android's CordovaPlugin remapUri Override for iOS Cordova Plugins

From Dev

Cannot create a folder and put a file inside this folder

From Dev

PHP File count inside a folder

Related Related

  1. 1

    cordova.file.dataDirectory not creating file inside the app folder

  2. 2

    What is the purpose for the resource folder in Maven?

  3. 3

    Using Cordova Plugins in Ionic Inside a Controller

  4. 4

    What is the purpose of > in a CSS file

  5. 5

    What is the purpose of CRX file?

  6. 6

    What is the purpose of queueCount inside VkDeviceQueueCreateInfo?

  7. 7

    What is the purpose of taco.json in Apache Cordova Visual Studio 2015 project?

  8. 8

    Manage cordova plugins with npm + package.json

  9. 9

    Cordova : what kind of cordova plugins should be removed in release time?

  10. 10

    What purpose does the Public folder serve

  11. 11

    What is the purpose of .bin folder in node_modules?

  12. 12

    What purpose does the Public folder serve

  13. 13

    What is the purpose of the Common Files folder in Program Files?

  14. 14

    What is the purpose of the 'metal' folder in a programming language?

  15. 15

    What is the purpose of derived data folder in Xcode?

  16. 16

    no .xcodeproj file in cordova app folder

  17. 17

    cordova-3.4.0 doesn't copy plugins to platform folder

  18. 18

    what is the purpose of tsconfig.json?

  19. 19

    what is the purpose of using JSON in android?

  20. 20

    Cordova not recognized as external command inside project folder?

  21. 21

    What is the purpose of schema.json in angular 2? Why we provide it in angular-cli.json file?

  22. 22

    Adding stylesheet from plugins folder to front end, inside of plugin

  23. 23

    Eclipse plugin dev: make bundle to explode inside `plugins` folder

  24. 24

    cordova : what is the use of platform_www folder?

  25. 25

    What's the purpose of the "merges" and "runs" tags in a Cordova plugin?

  26. 26

    What's the purpose of the "merges" and "runs" tags in a Cordova plugin?

  27. 27

    What is the Equivalent of Android's CordovaPlugin remapUri Override for iOS Cordova Plugins

  28. 28

    Cannot create a folder and put a file inside this folder

  29. 29

    PHP File count inside a folder

HotTag

Archive