commit | 393118f9009c2931a23a528bac73b5e35aab2c52 | [log] [tgz] |
---|---|---|
author | Steve Gill <stevengill97@gmail.com> | Mon May 01 12:24:01 2017 +0200 |
committer | Steve Gill <stevengill97@gmail.com> | Mon May 01 12:24:01 2017 +0200 |
tree | 9bebe31a63b25f59f5be9fe7fc9cb4f0eb274f96 | |
parent | 92aa8e7965b23991a430b9753c1f01ea2953fa5c [diff] |
CB-10681: templates will add @latest when fetching from npm when no version is specified. This will ensure an older cahced version of the template is not used
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: '' } } };