commit | 660056966f976f1e15a523c257eb1df012b51e8f | [log] [tgz] |
---|---|---|
author | Audrey So <audreyso@apache.org> | Tue Mar 07 16:07:13 2017 -0800 |
committer | Steve Gill <stevengill97@gmail.com> | Wed Mar 29 10:15:27 2017 -0700 |
tree | 4dc60d54ddf88a76b3fde5e1f41c28dab2e89aa1 | |
parent | 2721c00a20d722422e38ef47b6ddff4cff456d15 [diff] |
CB-12517 : pkgjson displayname should equal config's name and pkgjson.name should equal config's id This closes #3
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: '' } } };