Prepare Fetch 2.0.1 Patch Release (#61)
* Bumped cordova-common@^3.1.0
* Bumped fs-extra@^7.0.1
* Bumped pify@^4.0.1
* Bumped resolve@^1.10.0
* Bumped semver@^5.6.0
* Bumped eslint@^5.15.2
* Bumped eslint-plugin-import@^2.16.0
* Bumped eslint-plugin-node@^8.0.1
* Bumped eslint-plugin-promise@^4.0.1
* Bumped jasmine@^3.3.1
* Bumped nyc@^13.3.0
1 file changed
tree: 71ba5e9101eec60998e3aa255ee2cf5c3499a915
- .github/
- spec/
- .eslintrc.yml
- .gitignore
- .ratignore
- .travis.yml
- appveyor.yml
- index.js
- package.json
- README.md
- RELEASENOTES.md
README.md

cordova-fetch

This package can be used to install and uninstall Node.js packages using npm.
Usage
fetch
Installs a module from npm, a git url or the local file system. Returns a Promise
resolving to the absolute path to the installed package.
const fetch = require('cordova-fetch');
fetch(spec, dest, opts).then(pathToInstalledPackage => {
// Do something
});
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) |
Options
Option | Default | Description |
---|
save | false | Adds the package as dependency to package.json iff true |
uninstall
Uninstalls a package from given directory. Returns a Promise
that resolves when removal has finished
const { uninstall } = require('cordova-fetch');
uninstall(packageName, dest, opts).then(() => {
// Do something
});
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 |
Options
Option | Default | Description |
---|
save | false | Removes dependency from package.json iff true |