Fix isRemoteUri (#52)

* Add unit tests for isRemoteUri

Including one failing test for paths that include @

* Fix isRemoteUri using npm-package-arg

Fixes #34

* Rename isRemoteUri to needsToBeFetched after switch to npa

The reason for the rename is, that there are also local specs where we
need to call fetch. For example tarballs.
4 files changed
tree: f88d7d20955d273a511d91bac04262cad6fe5b74
  1. .github/
  2. spec/
  3. .eslintrc.yml
  4. .gitignore
  5. .npmignore
  6. .ratignore
  7. .travis.yml
  8. appveyor.yml
  9. index.js
  10. LICENSE
  11. package-lock.json
  12. package.json
  13. README.md
  14. RELEASENOTES.md
README.md

Build status Build Status

cordova-create

This module is used for creating cordova style projects. It also incudes support for cordova templates. It can fetch templates from npm and git.

Usage:

const create = require('cordova-create');
await create(dest, opts);

Parameters

dest

Required. Path to the destination where the project will be created. Must be an empty dir if it exists.

opts

Optional. Supports following properties.

{
    // Attributes to be set in package.json & config.xml
    id: String,
    name: String,
    version: String,

    // The path/url/package-name to the template that should be used
    template: String,

    // An EventEmitter instance that will be used for logging purposes
    // (actually it only needs to implement a compatible `emit` method)
    events: EventEmitter
}