commit | 144546c6daebf7224390d6e2077c0d38b76c6460 | [log] [tgz] |
---|---|---|
author | Raphael von der Grün <raphinesse@gmail.com> | Sat Jun 16 14:00:57 2018 +0200 |
committer | Raphael von der Grün <raphinesse@gmail.com> | Sat Jun 16 14:00:57 2018 +0200 |
tree | a23008b1d36ddd2c676283d8265b891eb343be8e | |
parent | 3dd91cf90fbc5b9d73c50944c0fd8357c05d7446 [diff] |
Refactor fetch code - Package installation was factored out to prepare for the next commit - Verbose logging was altered - Unit tests use less mocks and test subjects directly Functionality should be completely unchanged.
This module is used for fetching modules from npm and gitURLs. It fetches the modules via npm install
. It can also npm uninstall
modules from a project.
var fetch = require('cordova-fetch'); fetch(spec, dest, opts);
spec
can be a string containg a npm packageID
or a git URL
. dest
is string of the directory location you wish to npm install
these modules. opts
is an Object of options cordova fetch handles. Currently, fetch only support the save
option. eg. {'save':true}
var npmUninstall = require('cordova-fetch').uninstall; npmUninstall(spec, dest, opts);
spec
can be a string containg a npm packageID
. dest
is string of the directory location you wish to npm uninstall
these modules. opts
is an Object of options cordova fetch handles. Currently, fetch only support the save
option. eg. {'save':true}