Skip to content

Commit

Permalink
Issue mozilla#2654 - Lint with Travis-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jbuck committed Feb 1, 2013
1 parent 43d6c6f commit 442bd8b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: node_js
node_js:
- 0.8
2 changes: 1 addition & 1 deletion make.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

//
Expand Down
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
3 changes: 3 additions & 0 deletions test/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
};

0 comments on commit 442bd8b

Please sign in to comment.