From 8f67e003caa53f0b46f3a12ff4ac27896018dec9 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:51:55 -0800 Subject: [PATCH 01/13] update dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 597f859..5538a11 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "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-if": "^1.2.5", @@ -40,7 +40,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", From 6d3444068f72840093b06311a264c603a93531f5 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:52:00 -0800 Subject: [PATCH 02/13] bump engine versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5538a11..0ab093b 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ ], "private": true, "engines": { - "node": "^0.12.x", - "npm": "^2.1.x" + "node": "^4.2.3", + "npm": "^3.5.1" }, "devDependencies": { "babel-core": "^5.8.25", From 88001659395900aaea5b023220265dd8b2a6c005 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:52:15 -0800 Subject: [PATCH 03/13] add travis.yml --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..961f083 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: node_js +node_js: +- '4.2.3' +branches: + only: + - master +cache: + directories: + - node_modules +install: +- npm install +before_script: +- npm run lint +- npm run test From ba6f21b91d52019cbdd8c1690aeed37bd9611845 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:52:26 -0800 Subject: [PATCH 04/13] fix eslintrc --- .eslintrc | 4 +--- __tests__/.eslintrc | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 9016ffe..e0e97a7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,9 +9,7 @@ }, "env": { "browser": true, - "node": true, - "jasmine": true, - "mocha": true + "node": true }, "rules": { "quotes": [2, "single"], diff --git a/__tests__/.eslintrc b/__tests__/.eslintrc index bb953e0..9039b52 100644 --- a/__tests__/.eslintrc +++ b/__tests__/.eslintrc @@ -1,4 +1,8 @@ { + "env": { + "jasmine": true, + "mocha": true + }, "globals": { "sinon": true, "sandbox": true, From 1680c20b7afecf1a0bd4c96704203e8863d85485 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:52:36 -0800 Subject: [PATCH 05/13] add dev dependencies and build status to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bebc326..4403de4 100644 --- a/README.md +++ b/README.md @@ -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). From fd1c4c73409e96bf631c7949d5f55e3019fe7ee0 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:57:29 -0800 Subject: [PATCH 06/13] set up linting task --- gulp/tasks/lint.js | 14 ++++++++++++++ package.json | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 gulp/tasks/lint.js diff --git a/gulp/tasks/lint.js b/gulp/tasks/lint.js new file mode 100644 index 0000000..ca67cf0 --- /dev/null +++ b/gulp/tasks/lint.js @@ -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) + .pipe(eslint()) + .pipe(eslint.format()) + .pipe(eslint.failAfterError()); + +}); \ No newline at end of file diff --git a/package.json b/package.json index 0ab093b..407c479 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "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", @@ -29,6 +30,7 @@ "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", From b9b74bce23e4ae622d10020f3c093160fd335494 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:57:36 -0800 Subject: [PATCH 07/13] add npm scripts --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 407c479..e491ff6 100644 --- a/package.json +++ b/package.json @@ -62,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" } } From a6fe78285941e00f2190319373df0a8f5a6e5c6e Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 19:57:51 -0800 Subject: [PATCH 08/13] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e491ff6..ba53dba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-rocket-boilerplate", - "version": "2.2.0", + "version": "2.3.0", "author": "Jake Marsh ", "description": "Boilerplate using React, Browserify, SASS, and Gulp.", "repository": { From 1f08bc1642457f8f0498654d2f1c71a9dae2ce36 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 20:01:02 -0800 Subject: [PATCH 09/13] Revert "bump engine versions" This reverts commit 6d3444068f72840093b06311a264c603a93531f5. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ba53dba..febc1b3 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ ], "private": true, "engines": { - "node": "^4.2.3", - "npm": "^3.5.1" + "node": "^0.12.x", + "npm": "^2.1.x" }, "devDependencies": { "babel-core": "^5.8.25", From 4c234d29b26759f0217f265a77f86017fcd3bdc1 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 20:01:58 -0800 Subject: [PATCH 10/13] change travis node version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 961f083..6e75615 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: -- '4.2.3' +- '0.12.7' branches: only: - master From b647a02cc7f8b53a6a195749cc50fc5c703078aa Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 20:06:26 -0800 Subject: [PATCH 11/13] lock history version for react-router --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index febc1b3..c46dca5 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "gulp-streamify": "0.0.5", "gulp-uglify": "^1.2.0", "gulp-util": "^3.0.6", - "history": "^1.13.0", + "history": "1.13.0", "humps": "^0.6.0", "istanbul": "^0.4.0", "jsdom": "^3.1.2", From a0927d2c85b62d5d33837caffa4951d9c8cdeb4f Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 20:13:07 -0800 Subject: [PATCH 12/13] also lint gulp and test files --- __tests__/utils/APIUtils.test.js | 2 +- gulp/tasks/lint.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/utils/APIUtils.test.js b/__tests__/utils/APIUtils.test.js index c971fb7..923e109 100644 --- a/__tests__/utils/APIUtils.test.js +++ b/__tests__/utils/APIUtils.test.js @@ -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' } diff --git a/gulp/tasks/lint.js b/gulp/tasks/lint.js index ca67cf0..d50a83a 100644 --- a/gulp/tasks/lint.js +++ b/gulp/tasks/lint.js @@ -6,7 +6,7 @@ import config from '../config'; gulp.task('lint', function() { - return gulp.src(config.scripts.src) + return gulp.src([config.scripts.src, config.testFiles, './*.js']) .pipe(eslint()) .pipe(eslint.format()) .pipe(eslint.failAfterError()); From e1df510e34e48a1af08d10dd0f0ab034064dad16 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Tue, 8 Dec 2015 20:13:18 -0800 Subject: [PATCH 13/13] fix testHelpers imports --- __tests__/App.test.js | 2 +- __tests__/pages/HomePage.test.js | 2 +- __tests__/pages/NotFoundPage.test.js | 2 +- __tests__/pages/SearchPage.test.js | 2 +- __tests__/stores/CurrentUserStore.test.js | 2 +- __tests__/utils/AuthAPI.test.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/__tests__/App.test.js b/__tests__/App.test.js index c049210..6a7b185 100644 --- a/__tests__/App.test.js +++ b/__tests__/App.test.js @@ -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() { diff --git a/__tests__/pages/HomePage.test.js b/__tests__/pages/HomePage.test.js index 40f59dc..54cde5c 100644 --- a/__tests__/pages/HomePage.test.js +++ b/__tests__/pages/HomePage.test.js @@ -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() { diff --git a/__tests__/pages/NotFoundPage.test.js b/__tests__/pages/NotFoundPage.test.js index b4dc1f6..5b5b520 100644 --- a/__tests__/pages/NotFoundPage.test.js +++ b/__tests__/pages/NotFoundPage.test.js @@ -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() { diff --git a/__tests__/pages/SearchPage.test.js b/__tests__/pages/SearchPage.test.js index ddcbd47..d3a6af0 100644 --- a/__tests__/pages/SearchPage.test.js +++ b/__tests__/pages/SearchPage.test.js @@ -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() { diff --git a/__tests__/stores/CurrentUserStore.test.js b/__tests__/stores/CurrentUserStore.test.js index 41bce2e..4381768 100644 --- a/__tests__/stores/CurrentUserStore.test.js +++ b/__tests__/stores/CurrentUserStore.test.js @@ -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'; diff --git a/__tests__/utils/AuthAPI.test.js b/__tests__/utils/AuthAPI.test.js index cf47596..3d56252 100644 --- a/__tests__/utils/AuthAPI.test.js +++ b/__tests__/utils/AuthAPI.test.js @@ -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() {