incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/15] git commit: final tweaks for jshint inclusion
Date Fri, 20 Apr 2012 00:21:40 GMT
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/16059485
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/16059485
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/16059485

Branch: refs/heads/master
Commit: 1605948507d30eff421181b719ade9cb0552ab5f
Parents: a1f5ee2
Author: Fil Maj <maj.fil@gmail.com>
Authored: Thu Apr 19 17:09:45 2012 -0700
Committer: Anis Kadri <anis.kadri@gmail.com>
Committed: Thu Apr 19 17:21:10 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/16059485/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index 1d08015..5bf156a 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);
@@ -101,10 +101,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/16059485/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/16059485/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;


Mime
View raw message