How to use the cordova-fetch.isNpmInstalled 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 / cordova / plugin / util.js View on Github external
function info (plugin) {
    var viewArgs = ['view'];
    plugin = plugin.shift();
    viewArgs.push(plugin);
    viewArgs.push('--json');
    // check if npm is installed
    return fetch.isNpmInstalled()
        .then(function () {
            return execa('npm', viewArgs)
                .then(({ stdout: info }) => {
                    var pluginInfo = JSON.parse(info);
                    return pluginInfo;
                });
        });
}

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