Skip to content

Commit

Permalink
Merge pull request #28 from jakemmarsh/continuous-integration
Browse files Browse the repository at this point in the history
Set up linting and continuous integration
  • Loading branch information
jakemmarsh committed Dec 9, 2015
2 parents 1d91436 + e1df510 commit 8592d2d
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
},
"env": {
"browser": true,
"node": true,
"jasmine": true,
"mocha": true
"node": true
},
"rules": {
"quotes": [2, "single"],
Expand Down
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: node_js
node_js:
- '0.12.7'
branches:
only:
- master
cache:
directories:
- node_modules
install:
- npm install
before_script:
- npm run lint
- npm run test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
react-rocket
============
[![Build Status](https://travis-ci.org/jakemmarsh/react-rocket-boilerplate.svg)](https://travis-ci.org/jakemmarsh/react-rocket-boilerplate) [![devDependency Status](https://david-dm.org/jakemmarsh/react-rocket-boilerplate/dev-status.svg)](https://david-dm.org/jakemmarsh/react-rocket-boilerplate#info=devDependencies)


A boilerplate using ReactJS (along with React Router and RefluxJS), SASS, Gulp, and Browserify that also utilizes Gulp best practices from [this resource](https://github.com/greypants/gulp-starter).

Expand Down
4 changes: 4 additions & 0 deletions __tests__/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"env": {
"jasmine": true,
"mocha": true
},
"globals": {
"sinon": true,
"sandbox": true,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import App from '../app/js/App';
import CurrentUserStore from '../app/js/stores/CurrentUserStore';
import CurrentUserActions from '../app/js/actions/CurrentUserActions';
import {ListenerMixin} from 'reflux';
import TestHelpers from '../utils/TestHelpers';
import TestHelpers from '../utils/testHelpers';

describe('App', function() {

Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/HomePage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';

import TestHelpers from '../../utils/TestHelpers';
import TestHelpers from '../../utils/testHelpers';
import HomePage from '../../app/js/pages/HomePage';

describe('Page: Home', function() {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/NotFoundPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';

import TestHelpers from '../../utils/TestHelpers';
import TestHelpers from '../../utils/testHelpers';
import NotFoundPage from '../../app/js/pages/NotFoundPage';

describe('Page: Not Found', function() {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/SearchPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';

import TestHelpers from '../../utils/TestHelpers';
import TestHelpers from '../../utils/testHelpers';
import SearchPage from '../../app/js/pages/SearchPage';

describe('Page: Search', function() {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/stores/CurrentUserStore.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import when from 'when';

import TestHelpers from '../../utils/TestHelpers';
import TestHelpers from '../../utils/testHelpers';
import CurrentUserStore from '../../app/js/stores/CurrentUserStore';
import CurrentUserActions from '../../app/js/actions/CurrentUserActions';
import AuthAPI from '../../app/js/utils/AuthAPI';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/utils/APIUtils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Util: APIUtils', function() {
let testResponse = {
status: 200,
body: {
camel_case: 'test',
camel_case: 'test', //eslint-disable-line camelcase
PascalCase: 'test',
camelCase: 'test'
}
Expand Down
2 changes: 1 addition & 1 deletion __tests__/utils/AuthAPI.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import APIUtils from '../../app/js/utils/APIUtils';
import AuthAPI from '../../app/js/utils/AuthAPI';
import TestHelpers from '../../utils/TestHelpers';
import TestHelpers from '../../utils/testHelpers';

describe('Util: AuthAPI', function() {

Expand Down
14 changes: 14 additions & 0 deletions gulp/tasks/lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

import gulp from 'gulp';
import eslint from 'gulp-eslint';
import config from '../config';

gulp.task('lint', function() {

return gulp.src([config.scripts.src, config.testFiles, './*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());

});
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-rocket-boilerplate",
"version": "2.2.0",
"version": "2.3.0",
"author": "Jake Marsh <[email protected]>",
"description": "Boilerplate using React, Browserify, SASS, and Gulp.",
"repository": {
Expand All @@ -21,14 +21,16 @@
},
"devDependencies": {
"babel-core": "^5.8.25",
"babel-eslint": "^5.0.0-beta4",
"babelify": "^6.1.x",
"browser-sync": "^2.7.13",
"browserify": "^10.2.6",
"debowerify": "^1.3.1",
"del": "^1.2.0",
"eslint-plugin-react": "^3.6.3",
"eslint-plugin-react": "^3.11.3",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.1",
"gulp-eslint": "^1.1.1",
"gulp-if": "^1.2.5",
"gulp-imagemin": "^2.3.0",
"gulp-jsx-coverage": "^0.2.6",
Expand All @@ -40,7 +42,7 @@
"gulp-streamify": "0.0.5",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.6",
"history": "^1.12.5",
"history": "1.13.0",
"humps": "^0.6.0",
"istanbul": "^0.4.0",
"jsdom": "^3.1.2",
Expand All @@ -60,5 +62,9 @@
"watchify": "^3.2.x",
"when": "^3.7.4",
"yargs": "^3.27.0"
},
"scripts": {
"lint": "./node_modules/.bin/gulp lint",
"test": "./node_modules/.bin/gulp test"
}
}

0 comments on commit 8592d2d

Please sign in to comment.