diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..baa0031d5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 diff --git a/make.js b/make.js index f327a3b85..a34ca1017 100644 --- a/make.js +++ b/make.js @@ -994,7 +994,7 @@ target.jshint = function() { //'extensions/chrome/*.js' ]; - exec('jshint --reporter test/reporter.js ' + LINT_FILES.join(' ')); + exit(exec('./node_modules/.bin/jshint --reporter test/reporter.js ' + LINT_FILES.join(' ')).code); }; // diff --git a/package.json b/package.json new file mode 100644 index 000000000..050543767 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "pdf.js", + "version": "0.7.169", + "dependencies": { + "jshint": "git://github.com/jshint/jshint.git#42ace75a" + }, + "scripts": { + "test": "node make jshint" + }, + "repository": { + "type": "git", + "url": "git://github.com/mozilla/pdf.js.git" + } +} diff --git a/test/reporter.js b/test/reporter.js index a203d1c65..c8993e3a9 100644 --- a/test/reporter.js +++ b/test/reporter.js @@ -23,6 +23,9 @@ module.exports = { if (str) { process.stdout.write(str + "\n" + len + " error" + ((len === 1) ? "" : "s") + "\n"); + process.exit(2); + } else { + process.exit(0); } } };