You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/07/27 02:29:15 UTC
[9/78] [abbrv] git commit: commas man. wtf
commas man. wtf
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/commit/4dadcd67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/tree/4dadcd67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/diff/4dadcd67
Branch: refs/heads/cordova-client
Commit: 4dadcd67e6434086d7ef820b3c03441b91b0df07
Parents: 923b541
Author: Fil Maj <ma...@gmail.com>
Authored: Wed Jul 25 23:32:26 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Wed Jul 25 23:32:26 2012 -0700
----------------------------------------------------------------------
cordova.js | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/4dadcd67/cordova.js
----------------------------------------------------------------------
diff --git a/cordova.js b/cordova.js
index e29bd53..e26f774 100755
--- a/cordova.js
+++ b/cordova.js
@@ -1,20 +1,19 @@
-var fs = require('fs')
-, path = require('path')
-, util = require('util')
-, exec = require('child_process').exec
-, dist = process.env.CORDOVA_HOME != undefined ? process.env.CORDOVA_HOME : path.join(__dirname, 'lib', 'cordova-1.9.0')
-, colors = require('colors')
-, wrench = require('wrench')
-, config_parser = require('./src/config_parser')
-
+var fs = require('fs'),
+ path = require('path'),
+ util = require('util'),
+ exec = require('child_process').exec,
+ dist = process.env.CORDOVA_HOME !== undefined ? process.env.CORDOVA_HOME : path.join(__dirname, 'lib', 'cordova-1.9.0'),
+ colors = require('colors'),
+ wrench = require('wrench'),
+ config_parser = require('./src/config_parser');
module.exports = {
help: function help () {
var raw = fs.readFileSync(path.join(__dirname, 'doc', 'help.txt')).toString('utf8').split("\n");
return raw.map(function(line) {
if (line.match(' ')) {
- var prompt = ' $ '
- , isPromptLine = !!(line.indexOf(prompt) != -1);
+ var prompt = ' $ ',
+ isPromptLine = !(!(line.indexOf(prompt) != -1));
if (isPromptLine) {
return prompt.green + line.replace(prompt, '');
}
@@ -36,10 +35,10 @@ module.exports = {
},
docs: function docs () {
- var express = require('express')
- , port = 2222
- , static = path.join(dist, 'doc')
- , server = express.createServer();
+ var express = require('express'),
+ port = 2222,
+ static = path.join(dist, 'doc'),
+ server = express.createServer();
server.configure(function() {
server.use(express.static(static));
@@ -68,6 +67,7 @@ module.exports = {
}
// Check for existing cordova project
+ // TODO: this should throw...
try {
if (fs.lstatSync(path.join(dir, '.cordova')).isDirectory()) {
console.error('Cordova project already exists at ' + dir + ', aborting.');