Node.jsの開発を超速化するGitHub連携 三種の神器


Node.js Advent Calendar 2013 - Adventar9

GitHubNode.jsnpm便3


TravisCI

Coveralls

David


TravisCoverallslife changingpush*1

GitHub Pull-Request & Travis CI & Coveralls Integration



Github: https://github.com/teppeis/fixclosure

Travis: https://travis-ci.org/teppeis/fixclosure

Coveralls: https://coveralls.io/r/teppeis/fixclosure

David: https://david-dm.org/teppeis/fixclosure

TravisCI



Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community


CIJenkins

Travis Ci
使


(一)https://travis-ci.org/ GitHub

(二)AccountsCIGitHubON

(三)package.json scripts.testnpm test

(四).travis.yml

language: node_js
node_js:
  - 0.10

push使

TravisGrunt使


GruntTravisgrunt-cli

devdependenciesgrunt-clinpm install grunt-cliscripts.testnode_modulesgrunt-cli
// package.json
"scripts": {
  "test": "node_modules/grunt-cli/bin/grunt"
},

Coveralls



Coveralls - Test Coverage History & Statistics




Coveralls


Coveralls - file detail
GitHub

Coveralls blanket.js使


Blanket.js | Seamless javascript code coverage


Blanket.jsEsprimarequire('blanket')requireinstrument*2

instrument

Coverallsgrunt-mocha-cov使

Gruntfile.jsmochacovoptions.coveralls.serviceName"travis-ci"TravisCoveralls
// Gruntfile.js
mochacov: {
  test: {
    options: {
      files: ['test/*.coffee'],
      coveralls: {
        serviceName: 'travis-ci'
      }
    }
  }
},

mochacovnpm blanketpackage.jsonnode_modules
// package.json
"scripts": {
  "test": "node_modules/grunt-cli/bin/grunt",
  "blanket": {
    "pattern": "/project-name/lib/"
  }
},


David



David, a dependency management tool for Node.js projects


package.jsonnpmpublish Good

David dm
npmGemnasiumGitHubnpmgemgem

David*3npmDavid使




GitHub Badges

*1:もちろんJenkinsでも同じようなことができるので環境が用意できる人はそちらでも問題ないです。

*2:計測用コードを仕込む、みたいな意味です。これって日本語で何て言うんでしょう?

*3:最近はどうなんでしょう。