Apache cordova fetch

Clone this repo:
  1. e688237 chore(asf): update git notification settings by Erisu · 5 weeks ago master
  2. 5a5ff0b Update CONTRIBUTING.md by Niklas Merz · 7 weeks ago
  3. 787574b Increment package version to 3.0.1-dev by Erisu · 7 weeks ago
  4. 25e8903 fetch-3.0.0 Updated RELEASENOTES.md for release 3.0.0 by Erisu · 7 weeks ago 3.0.x 3.0.0 rel/3.0.0
  5. 642a4c2 Added NOTICE & LICENSE file for release by Erisu · 7 weeks ago



Node CI

This package can be used to install and uninstall Node.js packages using npm.



Installs a module from:

  • npm registry
  • git url
  • tarball
    • url
    • file on local file system
  • folder path on local system

Returns a Promise resolving to the absolute path of the installed package.

const fetch = require('cordova-fetch');

fetch(spec, dest, opts).then(pathToInstalledPackage => {
    // Do something

Fetch Parameters

Parameter | Description -|- spec | A spec for the package to be installed (anything supported by npm install) dest | Location where to install the package opts | Additional options (optional)

Fetch Options

Option | Default | Description -|-|- save | false | Adds the package as dependency to package.json iff true


Uninstalls a package from the given directory. Returns a Promise that resolves when removal has finished.

const { uninstall } = require('cordova-fetch');

uninstall(packageName, dest, opts).then(() => {
    // Do something

Uninstall Parameters

Parameter | Description -|- packageName | Name of the package to be uninstalled dest | Location from where to uninstall the package opts | An Object with additional options

Uninstall Options

Option | Default | Description -|-|- save | false | Removes dependency from package.json iff true