Skip to content

Commit

Permalink
Merge pull request #7 from michaelbpaulson/master
Browse files Browse the repository at this point in the history
Added the travis/gitignore/ and bithoundrc files.  Now its time to ge…
  • Loading branch information
ThePrimeagen committed Nov 13, 2015
2 parents 26c8dfe + a836685 commit fa24ad9
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 40 deletions.
10 changes: 10 additions & 0 deletions .bithoundrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignore": [
"**/node_modules/**",
"build/**",
"coverage/**",
"dist/**",
"test/**",
"gulpfile.js"
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
coverage
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: node_js

env:
global:
- secure: "NeBjrpBxfbE9jW4NDgeiMHfI5P4C2BDcR2kchSubntNBOfDENaNav0x9MRUVmH9o531X5uMcTadFBQJWAeGxbQRK7CvZGdHDfPKWyjcf2o7SYHAceDMk18f0jeeay2v+MpH/h0pV6MAn/ypjIHK1TuRwCtjTTJTcVknA3im6Fb7iQASz40aRJ71ZqlzNq8yVFOiMqo00Z6iuZlVwsOeF9qHI87Y/8xmTXCEountLwd/xLyA3btejmAvaFnc2fDC9Zyzz++dQ8RhiO1xkovUxUDvy02mXMXPph64ZeUwte8lmO4OXWcJQTrus399HCXDxt81CohQDa5+AYYQUH8jVRrdTdZcYC1+zhkwJztaAEgqLnwOoOAdoFdN0gBOx6fKXb3/c+fLJOM/zo5OmjVxWD6XgBq031KqI05wMtmcFxMXHWctIeUCQjNCL8PB617Y76+TxQTVtIZ8CStoHkGupYdDOfPgCmpPL+3PWMmIH0eTvUiGgZv7D+gt8TZYMtMBSW4adyMVbo9JxiLMscPve5HdaQvXtNCb8OzpoSdlVi5p391kUcHUmiSEytQYwG0bGncCq32KhsmXZWm2UOK45xoWTpHoij5vO7VMZ1OxIvRxE8f7qA8wrMmfYTK9XCwQf7MbDoYuMCOMR5O4btAqH8ma/OqR5xv6r28qSLTcPVC8="

node_js:
- "4.1.2"

branches:
only:
- master

# Run as a docker container
sudo: false

# Update npm to the latest version
before_install: npm update -g npm

# travis runs 'npm install' by default, as the 'install' step

before_script: npm run dist;
# travis runs 'npm test' by default, as the 'script' step

# PLACEHOLDER FOR COVERAGE REPORTS ON GITHUB, IF WE WANT THEM.
# ALSO NEED TO ADD .coveralls.yml, IF WE WANT TO USE IT ON THE PRIVATE
# REPO.


after_script:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

notifications:
email:
falcor@netflix.com

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# falcor-datasource-chainer
[![Coverage Status](https://coveralls.io/repos/Netflix/falcor-datasource-chainer/badge.svg?branch=master&service=github)](https://coveralls.io/github/Netflix/falcor-datasource-chainer?branch=master)
[![Build Status](https://travis-ci.org/Netflix/falcor-datasource-chainer.svg?branch=master)](https://travis-ci.org/Netflix/falcor-datasource-chainer)
[![bitHound Score](https://www.bithound.io/github/Netflix/falcor-datasource-chainer/badges/score.svg)](https://www.bithound.io/github/Netflix/falcor-datasource-chainer)
11 changes: 11 additions & 0 deletions build/build.license.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var license = require('gulp-license');
var licenseInfo = {
organization: 'Netflix, Inc',
year: '2015'
};

module.exports = function buildLicense(fromPipe) {
return fromPipe.
pipe(license('Apache', licenseInfo));
};

35 changes: 35 additions & 0 deletions build/build.style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
var gulp = require('gulp');
var jscs = require('gulp-jscs');
var eslint = require('gulp-eslint');

gulp.task('jscs', function _jscs() {
return gulp.src([
'./src/**/*.js',
'./build/**/*.js',
'./gulpfile.js'
]).
pipe(jscs()).
pipe(jscs.reporter());
});

gulp.task('lint', function _lint() {
return gulp.src(['src/**/*.js']).
pipe(eslint()).
pipe(eslint.format()).
pipe(eslint.failAfterError());
});

gulp.task('lint-test', function _lint() {
return gulp.src(['test/**/*.js']).
pipe(eslint({
globals: {
describe: false,
it: true
},
rules: {
'no-unused-expressions': [ 0 ]
}
})).
pipe(eslint.format()).
pipe(eslint.failAfterError());
});
16 changes: 16 additions & 0 deletions build/build.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var gulp = require('gulp');
var istanbul = require('gulp-istanbul');
var mocha = require('gulp-mocha');

gulp.task('test-coverage', function testCoverage(cb) {
gulp.src(['./src/**/*.js']).
pipe(istanbul()).
pipe(istanbul.hookRequire()).
on('finish', function onFinish() {
gulp.src(['./test/index.js']).
pipe(mocha()).
pipe(istanbul.writeReports()).
on('end', cb);
});
});

37 changes: 5 additions & 32 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
var gulp = require('gulp');
var jscs = require('gulp-jscs');
var eslint = require('gulp-eslint');

// Gulp build step require
require('./build/build.style');
require('./build/build.test');

gulp.task('build', ['jscs', 'lint', 'lint-test']);
gulp.task('dist', ['jscs', 'lint', 'lint-test', 'test-coverage']);
gulp.task('default', ['build']);

gulp.task('jscs', function _jscs() {
return gulp.src([
'./src/**/*.js',
'./gulpfile.js'
]).
pipe(jscs()).
pipe(jscs.reporter());
});

gulp.task('lint', function _lint() {
return gulp.src(['src/**/*.js']).
pipe(eslint()).
pipe(eslint.format()).
pipe(eslint.failAfterError());
});

gulp.task('lint-test', function _lint() {
return gulp.src(['test/**/*.js']).
pipe(eslint({
globals: {
describe: false,
it: true
},
rules: {
'no-unused-expressions': [ 0 ]
}
})).
pipe(eslint.format()).
pipe(eslint.failAfterError());
});
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"scripts": {
"test": "mocha test/index.js",
"build": "gulp jscs"
"build": "gulp build",
"dist": "gulp dist"
},
"repository": {
"type": "git",
Expand All @@ -25,12 +26,16 @@
},
"homepage": "https://github.com/Netflix/falcor-datasource-chainer#readme",
"devDependencies": {
"chai": "^3.4.1",
"gulp": "^3.9.0",
"gulp-eslint": "^1.1.0",
"gulp-jscs": "^3.0.2",
"mocha": "^2.3.3",
"rx": "^4.0.6",
"sinon": "^1.17.2"
"chai": "3.4.1",
"coveralls": "2.11.4",
"gulp": "3.9.0",
"gulp-eslint": "1.1.0",
"gulp-istanbul": "0.10.2",
"gulp-jscs": "3.0.2",
"gulp-mocha": "2.1.3",
"mocha": "2.3.3",
"rx": "4.0.6",
"sinon": "1.17.2",
"webpack": "^1.12.4"
}
}

0 comments on commit fa24ad9

Please sign in to comment.