Browse Source

Merge pull request #2655 from jbuck/travisci

Issue #2654 - Lint with Travis-CI
Yury Delendik 12 years ago
parent
commit
4bbf0ac5c2
  1. 3
      .travis.yml
  2. 2
      make.js
  3. 14
      package.json
  4. 3
      test/reporter.js

3
.travis.yml

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

2
make.js

@ -994,7 +994,7 @@ target.jshint = function() { @@ -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

@ -0,0 +1,14 @@ @@ -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
test/reporter.js

@ -23,6 +23,9 @@ module.exports = { @@ -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);
}
}
};

Loading…
Cancel
Save