Skip to content

Commit

Permalink
[#175] - remove project create function
Browse files Browse the repository at this point in the history
  • Loading branch information
surajpindoria committed Nov 10, 2016
1 parent 36d7f70 commit 931ae2a
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 790 deletions.
45 changes: 0 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,51 +113,6 @@ Example:
.on('error', function(e) {
// an error occured
});

### phonegap.create(options)

The project is created from the same app template used by the PhoneGap CLI
and Cordova CLI. When a template does not exist, it is fetched and saved
in the common directory:

~/.cordova/lib/www/phonegap/VERSION/

Options:

- `options` {Object}
- `path` {String} is the path to create the project.
- `version` {String} defines the PhoneGap app version.

Events:

- `progress` emits state while downloading the app template.
- `state` {Object} with `received`, `total`, and `percentage`.
- `error` emitted when an error occurs.
- `e` {Error}
- `complete` emits when the project has been created.
- `data` {Object} is indentical to the input `options`.

Example:

phonegap.create({
path: 'path/to/app',
version: '3.3.0'
})
.on('progress', function(state) {
// only emitted when downloading a template.
// state values are only defined when response supports
// content-length header.
if (state.percentage) {
console.log('downloaded: ' + state.percentage + '%');
}
})
.on('error', function(e) {
// handle error
console.log('error:', e);
})
.on('complete', function(data) {
// data.path is the app path
console.log('created project at: ' + data.path);
});

[travis-ci-img]: https://travis-ci.org/phonegap/connect-phonegap.svg?branch=master
Expand Down
16 changes: 0 additions & 16 deletions example/basic.js

This file was deleted.

307 changes: 0 additions & 307 deletions lib/create.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
*/

module.exports = require('./middleware');
module.exports.create = require('./create');
module.exports.listen = require('./serve');
module.exports.serve = require('./serve');
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"connect": "2.30.2",
"connect-inject": "0.4.0",
"gaze": "0.4.3",
"home-dir": "0.1.2",
"http-proxy": "1.8.1",
"ip": "0.3.1",
"localtunnel": "1.3.0",
Expand Down

0 comments on commit 931ae2a

Please sign in to comment.