commit | e020d8db9871f6689298577e80d1962e9300d027 | [log] [tgz] |
---|---|---|
author | Raphael von der Grün <raphinesse@gmail.com> | Thu Jul 05 12:48:38 2018 +0200 |
committer | Raphael von der Grün <raphinesse@gmail.com> | Thu Jul 05 12:48:38 2018 +0200 |
tree | a28276b29e726f4df83b26fa20f5f8bd0d707ef8 | |
parent | b990ac824fe6ed2d81043d3a2432ec43a1602a10 [diff] |
Simplify main function behind legacy adapter Including: - Unwrap deeply nested options object - Rename options object to `opts` - Shallow copy `opts` to avoid mutating caller's object - Make Q-wrapping explicit Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
This module is used for creating cordova style projects. It also incudes support for cordova templates. It can fetch templates from npm and git.
:
var create = require('cordova-create'); create(dir, id, name, cfg, extEvents);
dir
- directory where the project will be created. Required. id
- app id. Required (but can be “undefined”). name
- app name. Required (but can be “undefined”). cfg
- extra config to be saved in .cordova/config.json Required (but can be “{}”). extEvents
- An EventEmitter instance that will be used for logging purposes. Required (but can be “undefined”).
An example of cfg which would fetch a cordova template from npm (or git):
var cfg = { lib: { www: { template: true, url: 'cordova-app-hello-world', version: '' } } };