You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/04/20 02:08:14 UTC

[1/7] git commit: final tweaks for jshint inclusion

Updated Branches:
  refs/heads/master 5322e90b7 -> 3043d5c7e


final tweaks for jshint inclusion


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/3043d5c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/3043d5c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/3043d5c7

Branch: refs/heads/master
Commit: 3043d5c7e6a1a6e32b2b068c3cc4469f607bf4a1
Parents: b8d02d5
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Apr 19 17:09:45 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Apr 19 17:09:45 2012 -0700

----------------------------------------------------------------------
 Jakefile       |   10 ++++++----
 README.md      |    5 +++--
 lib/cordova.js |    2 +-
 3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3043d5c7/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index f92064a..043c49d 100644
--- a/Jakefile
+++ b/Jakefile
@@ -57,7 +57,7 @@ task('clean', ['set-cwd'], function () {
 }, true);
 
 desc("compiles the source files for all extensions");
-task('build', ['clean'], function () {
+task('build', ['clean', 'hint'], function () {
     var packager = require("./build/packager");
     var commitId = "";
     childProcess.exec("git log -1",function(err,stdout,stderr) {
@@ -66,7 +66,7 @@ task('build', ['clean'], function () {
             commitId = stdoutLines[0];
         }
         
-        console.log("commit = " + commitId);
+        console.log("building " + commitId);
         packager.generate("blackberry",commitId);
         packager.generate("playbook",commitId);
         packager.generate("ios",commitId);
@@ -100,10 +100,12 @@ desc('check sources with JSHint');
 task('hint', ['fixwhitespace'], function () {
     var knownWarnings = ["Redefinition of 'FileReader'", "Redefinition of 'require'", "Read only"];
     var filterKnownWarnings = function(el, index, array) {
-        var wut = false;
+        var wut = true;
+        // filter out the known warnings listed out above
         knownWarnings.forEach(function(e) {
-            wut = wut && (el.indexOf(e) > -1);
+            wut = wut && (el.indexOf(e) == -1);
         });
+        wut = wut && (!el.match(/\d+ errors/));
         return wut;
     };
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3043d5c7/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 4c4b127..b3ac679 100644
--- a/README.md
+++ b/README.md
@@ -67,8 +67,9 @@ All of the build tasks can be run via the `jake` node module. Install it globall
 
     sudo npm install -g jake
 
-Every build also runs the scripts through [JSHint](). It is best
-installed globally:
+Every build also runs the scripts through [JSHint](http://jshint.com). It is best
+installed globally, but it is _not_ necessary for building cordova-js
+(you just won't get syntax and style hints when you build):
 
     sudo npm install -g jshint
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3043d5c7/lib/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova.js b/lib/cordova.js
index 5deeed5..01ac1c0 100644
--- a/lib/cordova.js
+++ b/lib/cordova.js
@@ -264,4 +264,4 @@ if (!window.plugins) {
     window.plugins = {};
 }
 
-module.exports = cordova;
\ No newline at end of file
+module.exports = cordova;