Skip to content

Commit 098d10a

Browse files
authored
Merge pull request #61 from r-park/chore
chore: misc. updates
2 parents d963c97 + 2469f6c commit 098d10a

File tree

9 files changed

+88
-78
lines changed

9 files changed

+88
-78
lines changed

.babelrc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"stage-0"
66
],
77

8-
"plugins": [
9-
"react-hot-loader/babel"
10-
],
11-
128
"env": {
13-
"production": {
9+
"development": {
1410
"plugins": [
15-
"transform-react-constant-elements",
16-
"transform-react-inline-elements"
11+
"react-hot-loader/babel"
12+
]
13+
},
14+
"production": {
15+
"presets": [
16+
"react-optimize"
1717
]
1818
}
1919
}

.eslintrc.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ rules:
175175
no-undef-init: 2
176176
no-undefined: 0
177177
no-unexpected-multiline: 2
178-
no-underscore-dangle: [2, {allowAfterThis: true}]
178+
no-underscore-dangle: 0
179179
no-unmodified-loop-condition: 2
180180
no-unneeded-ternary: 0
181181
no-unreachable: 2
@@ -239,41 +239,46 @@ rules:
239239
react/display-name: 0
240240
react/forbid-prop-types: [2, {forbid: ["any"]}]
241241
react/jsx-boolean-value: 0
242-
react/jsx-closing-bracket-location: [2, {nonEmpty: 'after-props'}]
242+
react/jsx-closing-bracket-location: [2, {selfClosing: "tag-aligned", nonEmpty: "after-props"}]
243243
react/jsx-curly-spacing: [2, "never"]
244244
react/jsx-equals-spacing: [2, "never"]
245+
react/jsx-filename-extension: 0
245246
react/jsx-first-prop-new-line: [2, "multiline"]
246247
react/jsx-handler-names: 0
247248
react/jsx-indent: [1, 2]
248249
react/jsx-indent-props: [1, 2]
249250
react/jsx-key: 2
250251
react/jsx-max-props-per-line: 0
251252
react/jsx-no-bind: [0, {ignoreRefs: true}]
253+
react/jsx-no-comment-textnodes: 2
252254
react/jsx-no-duplicate-props: 2
253255
react/jsx-no-literals: 0
256+
react/jsx-no-target-blank: 2
254257
react/jsx-no-undef: 2
255258
react/jsx-pascal-case: 2
256259
react/jsx-sort-props: 0
257260
react/jsx-space-before-closing: [2, "always"]
258261
react/jsx-uses-react: 1
259262
react/jsx-uses-vars: 1
263+
react/jsx-wrap-multilines: 2
260264
react/no-danger: 1
261265
react/no-deprecated: 1
262-
react/no-did-mount-set-state: [2, "allow-in-func"]
263-
react/no-did-update-set-state: [2, "allow-in-func"]
266+
react/no-did-mount-set-state: 2
267+
react/no-did-update-set-state: 2
264268
react/no-direct-mutation-state: 2
269+
react/no-find-dom-node: 2
265270
react/no-is-mounted: 2
266271
react/no-multi-comp: 1
272+
react/no-render-return-value: 2
267273
react/no-set-state: 0
268274
react/no-string-refs: 2
269275
react/no-unknown-property: 2
270276
react/prefer-es6-class: 2
271277
react/prefer-stateless-function: 2
272278
react/prop-types: 2
273-
react/react-in-jsx-scope: 1
274-
react/require-extension: 1
279+
react/react-in-jsx-scope: 2
280+
react/require-optimization: 0
275281
react/require-render-return: 2
276-
react/self-closing-comp: 2
282+
react/self-closing-comp: 0
277283
react/sort-comp: 1
278284
react/sort-prop-types: 1
279-
react/wrap-multilines: 2

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A version of this app built with [redux-saga middleware](https://github.com/yelo
1212
## Stack
1313

1414
- React
15-
- React-Hot-Loader `3.0.0-beta.2`
15+
- React-Hot-Loader `3.0.0-beta.5`
1616
- React-Redux
1717
- React-Router
1818
- React-Router-Redux
@@ -78,15 +78,14 @@ $ firebase deploy
7878
```
7979

8080

81-
NPM Command Summary
82-
-------------------
81+
NPM Commands
82+
------------
8383

8484
|Script|Description|
8585
|---|---|
86-
|`npm start`|Start webpack development server @ `localhost:3000`|
87-
|`npm run build`|Lint, test, and build the application to `./target`|
88-
|`npm run dev`|Same as `npm start`|
89-
|`npm run lint`|Lint `.js` files|
90-
|`npm run server`|Start express server @ `localhost:3000` to serve build artifacts from `./target` (must run `npm run build` first)|
91-
|`npm test`|Run unit tests with Karma and Jasmine|
92-
|`npm run test:watch`|Run unit tests with Karma and Jasmine; watch for changes to re-run tests|
86+
|npm start|Start webpack development server @ **localhost:3000**|
87+
|npm run build|Lint, test, and build the application to **./target**|
88+
|npm run lint|Lint **.js** files|
89+
|npm run server|Start express server @ **localhost:3000** to serve build artifacts from **./target** (must run **npm run build** first)|
90+
|npm test|Run unit tests with Karma and Jasmine|
91+
|npm run test:watch|Run unit tests with Karma and Jasmine; watch for changes to re-run tests|

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
machine:
22
node:
3-
version: 6.1
3+
version: 6.4
44

55
dependencies:
66
pre:

package.json

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,69 +14,70 @@
1414
"license": "MIT",
1515
"private": true,
1616
"engines": {
17-
"node": ">=5.11"
17+
"node": ">=6.4"
1818
},
1919
"scripts": {
2020
"build": "cross-env NODE_ENV=production webpack --display-chunks --progress",
21-
"clean": "del-cli ./target",
22-
"dev": "cross-env NODE_ENV=development webpack-dev-server --progress",
23-
"lint": "eslint -c .eslintrc.yml *.js ./src ./server",
24-
"prebuild": "npm-run-all clean lint test",
25-
"server": "cross-env NODE_ENV=development nodemon -w 'server/**/*.*' ./server/main.js",
26-
"start": "npm run dev",
21+
"clean": "del-cli target",
22+
"lint": "eslint -c .eslintrc.yml *.js src server",
23+
"prebuild": "run-s clean lint test",
24+
"server": "cross-env NODE_ENV=development nodemon -w 'server/**/*.*' server/main.js",
25+
"server:dev": "cross-env NODE_ENV=development webpack-dev-server --progress",
26+
"start": "npm run server:dev",
2727
"test": "cross-env NODE_ENV=test karma start --single-run",
2828
"test:watch": "cross-env NODE_ENV=test karma start"
2929
},
30+
"dependencies": {
31+
"babel-polyfill": "~6.13.0",
32+
"classnames": "~2.2.5",
33+
"immutable": "~3.8.1",
34+
"react": "~15.3.2",
35+
"react-dom": "~15.3.2",
36+
"react-redux": "~4.4.5",
37+
"react-router": "~2.8.1",
38+
"react-router-redux": "~4.0.6",
39+
"redux": "~3.6.0",
40+
"redux-thunk": "~2.1.0",
41+
"reselect": "~2.5.4"
42+
},
3043
"devDependencies": {
31-
"autoprefixer": "~6.3.6",
32-
"babel-core": "~6.10.4",
33-
"babel-eslint": "6.1.0",
34-
"babel-loader": "~6.2.4",
35-
"babel-plugin-transform-react-constant-elements": "~6.9.1",
36-
"babel-plugin-transform-react-inline-elements": "~6.8.0",
37-
"babel-polyfill": "~6.9.1",
38-
"babel-preset-es2015": "~6.9.0",
44+
"autoprefixer": "~6.4.1",
45+
"babel-core": "~6.14.0",
46+
"babel-eslint": "~6.1.2",
47+
"babel-loader": "~6.2.5",
48+
"babel-preset-es2015": "~6.14.0",
3949
"babel-preset-react": "~6.11.1",
50+
"babel-preset-react-optimize": "~1.0.1",
4051
"babel-preset-stage-0": "~6.5.0",
41-
"classnames": "~2.2.5",
42-
"cross-env": "~1.0.8",
43-
"css-loader": "~0.23.1",
52+
"cross-env": "~3.0.0",
53+
"css-loader": "~0.25.0",
4454
"del-cli": "~0.2.0",
45-
"eslint": "~2.13.1",
46-
"eslint-plugin-react": "~5.2.2",
55+
"eslint": "~3.6.0",
56+
"eslint-plugin-react": "~6.3.0",
4757
"express": "~4.14.0",
4858
"extract-text-webpack-plugin": "~1.0.1",
49-
"firebase": "~3.1.0",
50-
"firebase-tools": "3.0.4",
59+
"firebase": "~3.4.0",
60+
"firebase-tools": "3.0.7",
5161
"html-webpack-plugin": "~2.22.0",
52-
"immutable": "~3.8.1",
53-
"jasmine-core": "~2.4.1",
54-
"karma": "~1.0.0",
55-
"karma-chrome-launcher": "~1.0.1",
62+
"jasmine-core": "~2.5.2",
63+
"karma": "~1.3.0",
64+
"karma-chrome-launcher": "~2.0.0",
5665
"karma-jasmine": "~1.0.2",
5766
"karma-sourcemap-loader": "~0.3.7",
58-
"karma-webpack": "~1.7.0",
67+
"karma-webpack": "~1.8.0",
5968
"minx": "r-park/minx.git",
6069
"morgan": "~1.7.0",
61-
"node-sass": "~3.8.0",
62-
"nodemon": "~1.9.2",
63-
"npm-run-all": "~2.3.0",
64-
"postcss-loader": "~0.9.1",
65-
"react": "~15.2.0",
66-
"react-addons-test-utils": "~15.2.0",
67-
"react-dom": "~15.2.0",
68-
"react-hot-loader": "3.0.0-beta.2",
69-
"react-redux": "~4.4.5",
70-
"react-router": "~2.5.2",
71-
"react-router-redux": "~4.0.5",
72-
"redux": "~3.5.2",
73-
"redux-thunk": "~2.1.0",
74-
"reselect": "~2.5.3",
75-
"sass-loader": "~4.0.0",
76-
"sinon": "~1.17.4",
70+
"node-sass": "~3.10.0",
71+
"nodemon": "~1.10.2",
72+
"npm-run-all": "~3.1.0",
73+
"postcss-loader": "~0.13.0",
74+
"react-addons-test-utils": "~15.3.2",
75+
"react-hot-loader": "3.0.0-beta.5",
76+
"sass-loader": "~4.0.2",
77+
"sinon": "~1.17.6",
7778
"style-loader": "~0.13.1",
78-
"webpack": "~1.13.1",
79-
"webpack-dev-server": "~1.14.1",
79+
"webpack": "~1.13.2",
80+
"webpack-dev-server": "~1.16.1",
8081
"webpack-md5-hash": "~0.0.5",
8182
"winston": "~2.2.0"
8283
}

server/main.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ const logger = require('winston');
66
// SETUP
77
//---------------------------------------------------------
88
const PROJECT_ROOT_DIR = process.cwd();
9+
const STATIC_DIR = `${PROJECT_ROOT_DIR}/target`;
10+
11+
const HOST = '0.0.0.0';
12+
const PORT = 3000;
913

1014
const app = express();
1115

1216
app.set('host', process.env.HOST || 'localhost');
1317
app.set('port', process.env.PORT || 3000);
1418

1519
app.use(require('morgan')('dev'));
16-
app.use(express.static(`${PROJECT_ROOT_DIR}/target`));
20+
app.use(express.static(STATIC_DIR));
1721

1822

1923
//=========================================================
@@ -22,7 +26,7 @@ app.use(express.static(`${PROJECT_ROOT_DIR}/target`));
2226
const router = new express.Router();
2327

2428
router.get('*', (req, res) => {
25-
res.sendFile(`${PROJECT_ROOT_DIR}/target/index.html`);
29+
res.sendFile(`${STATIC_DIR}/index.html`);
2630
});
2731

2832
app.use(router);
@@ -31,11 +35,11 @@ app.use(router);
3135
//=========================================================
3236
// START SERVER
3337
//---------------------------------------------------------
34-
app.listen(app.get('port'), app.get('host'), error => {
38+
app.listen(PORT, HOST, error => {
3539
if (error) {
3640
logger.error(error);
3741
}
3842
else {
39-
logger.info(`Server listening @ ${app.get('host')}:${app.get('port')}`);
43+
logger.info(`Server listening @ ${HOST}:${PORT}`);
4044
}
4145
});

src/core/auth/actions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import firebase from 'firebase';
12
import { firebaseAuth } from 'src/core/firebase';
23
import {
34
INIT_AUTH,

src/core/firebase/firebase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'firebase';
1+
import firebase from 'firebase';
22
import { firebaseConfig } from './config';
33

44

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const ENV_DEVELOPMENT = NODE_ENV === 'development';
1515
const ENV_PRODUCTION = NODE_ENV === 'production';
1616
const ENV_TEST = NODE_ENV === 'test';
1717

18-
const HOST = process.env.HOST || 'localhost';
19-
const PORT = process.env.PORT || 3000;
18+
const HOST = '0.0.0.0';
19+
const PORT = 3000;
2020

2121

2222
//=========================================================

0 commit comments

Comments
 (0)