How to use the cordova-fetch.uninstall function in cordova-fetch

To help you get started, we’ve selected a few cordova-fetch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / cordova-lib / src / plugman / uninstall.js View on Github external
var doDelete = function (id) {
        var plugin_dir = path.join(plugins_dir, id);
        if (!fs.existsSync(plugin_dir)) {
            events.emit('verbose', 'Plugin "' + id + '" already removed (' + plugin_dir + ')');
            return Promise.resolve();
        }

        fs.removeSync(plugin_dir);
        events.emit('verbose', 'Deleted plugin "' + id + '"');

        // remove plugin from node_modules directory
        return npmUninstall(id, options.projectRoot, options);
    };
github apache / cordova-lib / src / cordova / platform.js View on Github external
return promiseutil.Q_chainmap(targets, function(target) {
                if(target in platforms) {
                    target = 'cordova-'+target;
                }
                // Edits package.json.
                return npmUninstall(target, projectRoot, opts);
            });
        }
github apache / cordova-lib / cordova-lib / src / cordova / platform.js View on Github external
return promiseutil.Q_chainmap(targets, function(target) {
                if(target in platforms) {
                    target = 'cordova-'+target;
                }
                // Edits package.json.
                return npmUninstall(target, projectRoot, opts);
            });
        }
github apache / cordova-lib / src / cordova / platform / remove.js View on Github external
return promiseutil.Q_chainmap(targets, function (target) {
                if (target in platforms) {
                    target = 'cordova-' + target;
                }
                // Edits package.json.
                return npmUninstall(target, projectRoot, opts);
            });
        }).then(function () {
github apache / cordova-lib / cordova-lib / src / plugman / uninstall.js View on Github external
var doDelete = function(id) {
        var plugin_dir = path.join(plugins_dir, id);
        if ( !fs.existsSync(plugin_dir) ) {
            events.emit('verbose', 'Plugin "'+ id +'" already removed ('+ plugin_dir +')');
            return Q();
        }
        
        shell.rm('-rf', plugin_dir);
        events.emit('verbose', 'Deleted "'+ id +'"');
        
        if(options.fetch) {
            //remove plugin from node_modules directory
            return npmUninstall(id, options.projectRoot, options); 
        }
        
        return Q();

    };

cordova-fetch

Apache Cordova fetch module. Fetches from git and npm.

Apache-2.0
Latest version published 2 years ago

Package Health Score

60 / 100
Full package analysis