You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/08/23 23:49:17 UTC

[11/14] git commit: added help method

added help method


Project: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/commit/1c20f3fa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/tree/1c20f3fa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/diff/1c20f3fa

Branch: refs/heads/master
Commit: 1c20f3fa5469c2e2c0a5c99b53801725f4ad365f
Parents: b20997d
Author: Steven Gill <st...@gmail.com>
Authored: Wed Aug 21 16:16:42 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Fri Aug 23 14:33:07 2013 -0700

----------------------------------------------------------------------
 bin/create | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/1c20f3fa/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 448e514..1652697 100755
--- a/bin/create
+++ b/bin/create
@@ -46,11 +46,8 @@ if((args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
 }
 
 function main(project_path,package_name,project_name){
-    var ROOT = path.join(__dirname, '..');
-    console.log(ROOT);
-    
+    var ROOT = path.join(__dirname, '..'); 
     var VERSION = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8');
-    console.log(VERSION);
     
     // Set default values for path, package and name
     project_path = typeof project_path !== 'undefined' ? project_path : "CordovaExample";
@@ -90,7 +87,11 @@ function main(project_path,package_name,project_name){
 }
 
 function help(){
-    console.log('you need help son');
+    console.log('Usage: ./' + path.relative(process.cwd(), path.join(__dirname, 'create')) + ' <path_to_new_project> <package_name> <project_name>');
+    console.log(' <path_to_new_project>: Path to your new Cordova Android project');
+    console.log(' <package_name>: Package name, following reverse-domain style convention');
+    console.log(' <project_name>: Project name');
+    process.exit(0);
 }
 
 function updateManifest(ROOT, project_path, project_name){