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
2 files changed
tree: 9bebe31a63b25f59f5be9fe7fc9cb4f0eb274f96
  1. .github/
  2. spec/
  3. .gitignore
  4. .npmignore
  5. .ratignore
  6. .travis.yml
  7. appveyor.yml
  8. index.js
  10. package.json
  11. README.md

Build status Build Status


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: ''