Skip to content
Browse files
Added unified fetching proposal
  • Loading branch information
stevengill committed Jun 2, 2016
1 parent 6adc554 commit 96a345d09cdd695b507fd82059af2dabf2a09f05
Showing 1 changed file with 29 additions and 0 deletions.
@@ -0,0 +1,29 @@
# Unified Cordova Fetching Proposal

### Current

Three existing fetching implementations.

1. Platform Fetching
- Platform.js
- Lazy Load

2. Plugin Fetching
- possiblyFetch
- fetch.js
- registry.fetch

3. Template Fetching
- create.js
- remote load

Both lazy load and remote load use gitclone.js

Currently, platforms and templates are cached at `~/.cordova/lib/npm_cache/PACKAGE`. On master, plugins are being cached to `~/.npm/PACKAGE`.

### Proposal:

* Create a new module named `cordova-fetch`. Fetches from npm, git and local paths.
* Start using system installed `npm` instead of packaging our own `npm` in `cordoba-lib`. We already check for `git` being installed, we should do the same for `npm`. We would use `superspawn` to shell out to the system `npm`.
* Stop using `.cordova/npm_cache/` and instead use `.npm/` for all of our `npm caching`. This will allow us to move away from passing custom config options to npm.
* Update existing fetching logic to use new `cordova-fetch` module.

0 comments on commit 96a345d

Please sign in to comment.