Issue #2654 - Lint with Travis-CI

This commit is contained in:
Jon Buckley 2013-02-01 11:36:58 -05:00
parent 43d6c6f1ab
commit 442bd8bd5a
4 changed files with 21 additions and 1 deletions

3
.travis.yml Normal file
View File

@ -0,0 +1,3 @@
language: node_js
node_js:
- 0.8

View File

@ -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);
};
//

14
package.json Normal file
View File

@ -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"
}
}

View File

@ -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);
}
}
};