diff --git a/.travis.yml b/.travis.yml index 0e100ef..12ecece 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,3 +9,4 @@ before_install: - echo -e "127.0.0.1 localhost\n127.0.0.1 travis001.onddo.com" | sudo tee -a /etc/hosts - sudo hostname 'travis001.onddo.com' - hostname | sudo tee /etc/hostname + - npm install -g jshint || true diff --git a/Makefile b/Makefile index afa94f5..26a5a03 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,9 @@ NO_JSHINT_VER=v0.8. JSHINT_ARGS=index.js lib test style: - node --version | grep -Fq '$(NO_JSHINT_VER)' && true || ./node_modules/.bin/jshint $(JSHINT_ARGS) + node --version | grep -Fq '$(NO_JSHINT_VER)' && true || jshint $(JSHINT_ARGS) -test: style +test: node --version | grep -Fq '$(COV_NODE_VER)' && ! test -z $(TRAVIS_JOB_ID) && $(MAKE) test-no-coveralls test-coveralls || $(MAKE) test-no-coveralls lib-cov: diff --git a/README.md b/README.md index 3e4ee47..c7f4aa2 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ node.js bridge library to communicate with java applications through JMX. [![NPM version](https://badge.fury.io/js/jmx.png)](http://badge.fury.io/js/jmx) [![Code Climate](http://img.shields.io/codeclimate/github/onddo/node-jmx.svg)](https://codeclimate.com/github/onddo/node-jmx) -[![Build Status](http://img.shields.io/travis/onddo/node-jmx/0.3.0.svg)](https://travis-ci.org/onddo/node-jmx) -[![Coverage Status](http://img.shields.io/coveralls/onddo/node-jmx/0.3.0.svg)](https://coveralls.io/r/onddo/node-jmx?branch=0.3.0) +[![Build Status](http://img.shields.io/travis/onddo/node-jmx.svg)](https://travis-ci.org/onddo/node-jmx) +[![Coverage Status](http://img.shields.io/coveralls/onddo/node-jmx.svg)](https://coveralls.io/r/onddo/node-jmx?branch=master) ## Requirements @@ -155,7 +155,8 @@ client.on("error", function(err) { ## Testing ```bash -$ make test +$ npm install -g jshint +$ make style test ``` You will need to set the `JAVA_HOME` environment variable if the java binary is not in your *PATH*. diff --git a/package.json b/package.json index 7c4e696..260c1cf 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/onddo/node-jmx/issues", "main": "index.js", "scripts": { - "test": "make test" + "test": "make style test" }, "repository": { "type": "git", @@ -40,8 +40,5 @@ "jscoverage" : "~0.5.9", "mocha-lcov-reporter" : "0.0.1", "coveralls": "2.11.2" - }, - "optionalDependencies": { - "jshint": "= 2.5.10" } }