File fetch.json created inside plugins folder after cordova plugin add executed first time. This file also modified each time I add/remove plugins.
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": {}
}
}
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 :
plugins/fetch.json
looks like its not possible to restore plugins with this file. My workflow is :
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