You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/01/09 17:43:15 UTC
[1/2] git commit: CB-4871 Remove unused dependencies in CLI
Updated Branches:
refs/heads/master f7b093db5 -> 011f9794f
CB-4871 Remove unused dependencies in CLI
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/75af910b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/75af910b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/75af910b
Branch: refs/heads/master
Commit: 75af910b6494df409587510f7845d4b7f2101e8b
Parents: f7b093d
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 9 11:41:41 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Jan 9 11:41:41 2014 -0500
----------------------------------------------------------------------
package.json | 7 ----
spec/metadata/blackberry_parser.spec.js | 1 -
src/lazy_load.js | 1 -
src/prepare.js | 2 --
src/ripple.js | 52 ----------------------------
5 files changed, 63 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/75af910b/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index cedb4cf..21ff10a 100644
--- a/package.json
+++ b/package.json
@@ -28,22 +28,15 @@
"cli"
],
"dependencies": {
- "colors": ">=0.6.0",
"elementtree": "0.1.5",
"plugman": "0.17.x",
"plist": "0.4.x",
"xcode": "0.6.2",
- "express": "3.0.0",
"shelljs": "0.1.2",
- "ncallbacks": "1.0.0",
"request": "2.22.0",
"ripple-emulator": "0.9.18",
"semver": "1.1.0",
- "glob": "3.2.x",
- "follow-redirects": "0.0.x",
- "prompt": "0.2.7",
"tar": "0.1.x",
- "open": "0.0.3",
"npm": "1.3.x",
"q": "~0.9",
"optimist": "0.6.0",
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/75af910b/spec/metadata/blackberry_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/blackberry_parser.spec.js b/spec/metadata/blackberry_parser.spec.js
index 097f860..6a47ef6 100644
--- a/spec/metadata/blackberry_parser.spec.js
+++ b/spec/metadata/blackberry_parser.spec.js
@@ -26,7 +26,6 @@ var platforms = require('../../platforms'),
Q = require('q'),
child_process = require('child_process'),
config = require('../../src/config'),
- prompt = require('prompt'),
config_parser = require('../../src/config_parser'),
cordova = require('../../cordova');
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/75af910b/src/lazy_load.js
----------------------------------------------------------------------
diff --git a/src/lazy_load.js b/src/lazy_load.js
index 825a512..c54d4b7 100644
--- a/src/lazy_load.js
+++ b/src/lazy_load.js
@@ -25,7 +25,6 @@ var path = require('path'),
request = require('request'),
config = require('./config'),
hooker = require('./hooker'),
- https = require('follow-redirects').https,
zlib = require('zlib'),
tar = require('tar'),
URL = require('url'),
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/75af910b/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index 92b828d..89daf5f 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -27,9 +27,7 @@ var cordova_util = require('./util'),
lazy_load = require('./lazy_load'),
config = require('./config'),
events = require('./events'),
- n = require('ncallbacks'),
Q = require('q'),
- prompt = require('prompt'),
plugman = require('plugman'),
util = require('util');
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/75af910b/src/ripple.js
----------------------------------------------------------------------
diff --git a/src/ripple.js b/src/ripple.js
deleted file mode 100644
index d576d58..0000000
--- a/src/ripple.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-var serve = require('./serve'),
- ripple = require('ripple-emulator'),
- open = require('open');
-
-module.exports = function (platform, port) {
- port = port || 8000;
-
- serve.config(platform, port, function (cfg) {
- ripple.emulate.start({
- path: cfg.paths,
- port: port
- });
-
- var device;
-
- switch (platform) {
- case "blackberry10":
- device = "Z10";
- break;
- case "ios":
- device = "IPhone5";
- break;
- case "android":
- device = "NexusS";
- break;
- default:
- device = "XVGA";
- break;
- }
-
- var uri = "http://localhost:" + port + "?enableripple=cordova-2.0.0-" + device;
- open(uri);
- });
-};
[2/2] git commit: CB-4871 Remove jshint dependency.
Posted by ag...@apache.org.
CB-4871 Remove jshint dependency.
Was used only to give better error message when parsing of config.json
fails. Node should give a good-enough message (plus this is a niche
file).
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/011f9794
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/011f9794
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/011f9794
Branch: refs/heads/master
Commit: 011f9794f2bc320d94cb0ee99b88472a1277e128
Parents: 75af910
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 9 11:42:19 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Jan 9 11:42:19 2014 -0500
----------------------------------------------------------------------
package.json | 1 -
src/config.js | 14 ++------------
2 files changed, 2 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/011f9794/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 21ff10a..4663e6e 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,6 @@
"npm": "1.3.x",
"q": "~0.9",
"optimist": "0.6.0",
- "jshint": "~1.1.0",
"mime": "~1.2.11",
"lodash": "~2.4.0"
},
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/011f9794/src/config.js
----------------------------------------------------------------------
diff --git a/src/config.js b/src/config.js
index 5f2836c..8c7fb9d 100644
--- a/src/config.js
+++ b/src/config.js
@@ -20,8 +20,7 @@
var path = require('path'),
fs = require('fs'),
url = require('url'),
- shell = require('shelljs'),
- JSHINT = require("jshint").JSHINT;
+ shell = require('shelljs');
module.exports = function config(project_root, opts) {
var json = module.exports.read(project_root);
@@ -43,16 +42,7 @@ module.exports.read = function get_config(project_root) {
return module.exports.write(project_root, {});
} else {
var data = fs.readFileSync(config_json, 'utf-8');
- try {
- return JSON.parse(data);
- } catch (e) {
- JSHINT(data);
- var err = JSHINT.errors[0];
- if (err) {
- throw new Error('Parsing "'+config_json+'" at line '+err.line+" col "+err.character+"; "+err.reason);
- }
- throw e;
- }
+ return JSON.parse(data);
}
};