cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dase...@apache.org
Subject cordova-plugin-console git commit: CB-10636 Add JSHint for plugins
Date Mon, 29 Feb 2016 07:31:14 GMT
Repository: cordova-plugin-console
Updated Branches:
  refs/heads/master 81acc69e5 -> 35c28ccc9


CB-10636 Add JSHint for plugins


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/commit/35c28ccc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/tree/35c28ccc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/diff/35c28ccc

Branch: refs/heads/master
Commit: 35c28ccc9956bc036e47f38bc0fa15eebb807e00
Parents: 81acc69
Author: daserge <v-seshak@microsoft.com>
Authored: Thu Feb 25 18:43:42 2016 +0300
Committer: daserge <v-seshak@microsoft.com>
Committed: Thu Feb 25 18:54:11 2016 +0300

----------------------------------------------------------------------
 .gitignore                |  2 +-
 .jshintrc                 | 17 +++++++++++++++++
 .travis.yml               |  4 ++++
 README.md                 |  2 ++
 package.json              |  9 ++++++++-
 tests/tests.js            | 12 ++++++------
 www/console-via-logger.js |  1 -
 www/logger.js             |  1 -
 8 files changed, 38 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 52b558e..6964ea0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,7 @@ Thumbs.db
 *.swp
 *.user
 
-
+node_modules
 
 
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/.jshintrc
----------------------------------------------------------------------
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..e042a96
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,17 @@
+{
+    "browser": true
+  , "devel": true
+  , "bitwise": true
+  , "undef": true
+  , "trailing": true
+  , "quotmark": false
+  , "indent": 4
+  , "unused": "vars"
+  , "latedef": "nofunc"
+  , "globals": {
+        "module": false,
+        "exports": false,
+        "require": false,
+        "console": true
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b9af4c5
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+sudo: false
+node_js:
+  - "4.2"

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index c835575..8c47c6b 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,8 @@
 #         under the License.
 -->
 
+[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-console)
+
 # cordova-plugin-console
 
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index bf16201..8f72168 100644
--- a/package.json
+++ b/package.json
@@ -28,6 +28,13 @@
     "cordova-windows8",
     "cordova-windows"
   ],
+  "scripts": {
+    "test": "npm run jshint",
+    "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint
src && node node_modules/jshint/bin/jshint tests"
+  },
   "author": "Apache Software Foundation",
-  "license": "Apache-2.0"
+  "license": "Apache-2.0",
+  "devDependencies": {
+    "jshint": "^2.6.0"
+  }
 }

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 6479e41..74765d9 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -19,24 +19,24 @@
  *
 */
 
+/* jshint jasmine: true */
+
 exports.defineAutoTests = function () {
   describe("Console", function () {
     it("console.spec.1 should exist", function() {
         expect(window.console).toBeDefined();
     });
-    
+
     it("console.spec.2 has required methods log|warn|error", function(){
         expect(window.console.log).toBeDefined();
         expect(typeof window.console.log).toBe('function');
-        
+
         expect(window.console.warn).toBeDefined();
         expect(typeof window.console.warn).toBe('function');
-        
+
         expect(window.console.error).toBeDefined();
-        expect(typeof window.console.error).toBe('function');                   
-        
+        expect(typeof window.console.error).toBe('function');
     });
-    
   });
 };
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/www/console-via-logger.js
----------------------------------------------------------------------
diff --git a/www/console-via-logger.js b/www/console-via-logger.js
index 4095eb3..ffee326 100644
--- a/www/console-via-logger.js
+++ b/www/console-via-logger.js
@@ -22,7 +22,6 @@
 //------------------------------------------------------------------------------
 
 var logger = require("./logger");
-var utils  = require("cordova/utils");
 
 //------------------------------------------------------------------------------
 // object that we're exporting

http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/35c28ccc/www/logger.js
----------------------------------------------------------------------
diff --git a/www/logger.js b/www/logger.js
index cbf81b9..430d887 100644
--- a/www/logger.js
+++ b/www/logger.js
@@ -43,7 +43,6 @@
 var logger = exports;
 
 var exec    = require('cordova/exec');
-var utils   = require('cordova/utils');
 
 var UseConsole   = false;
 var UseLogger    = true;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message