-
Notifications
You must be signed in to change notification settings - Fork 17
Version 2 #53
Conversation
CI is failing:
|
I fixed the build, but I still need to go over all the changes and verify that everything is OK. |
@AriaMinaei @ericnishio @Kotpes @villeristi could you also please go through the changes and approve them? Thank you in advance. |
.gitignore
Outdated
@@ -1,5 +1,26 @@ | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix, this is basically a completely new code base that was rebased on master
.
.lintstagedrc
Outdated
@@ -1,5 +1,6 @@ | |||
{ | |||
"*.js": [ | |||
"git add .", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's one less manual step that speeds up development and makes people work in smaller chunks. https://github.com/okonet/lint-staged#examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about this scenario:
- You work on something
- You've staged parts of some files and you're ready to commit
- You run the linter, and
git add .
fucks up your stage. Now you have to unstage everything and carefully stage the lines/chunks/files you had before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also a bit dubious. Did this cause the .gitignore merge errors to be committed? If anything, perhaps it should only add the modified .js files.
https://github.com/okonet/lint-staged#examples says:
Please note, that it doesn’t work well with committing hunks (
git add -p
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, IMO staging/committing is a job for the developer, not the machine.
README.md
Outdated
@@ -10,7 +10,11 @@ | |||
|
|||
## Why do I want this? | |||
|
|||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of merge errors here
package.json
Outdated
"redux-actions": "^2.0.2", | ||
"redux-saga": "^0.14.7" | ||
}, | ||
"devDependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO everything that is not related to webpack-dev-server
, linting etc. should be in dependencies
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why? We should be installing dev dependencies during CI and only leave them out when building production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've discussed this once already. The fact is that there are no "production dependencies" since the production build is just a bunch of .js
files and some assets.
Currently in order to build the production bundle you have to install every single dependency, including webpack-dev-server
.
You have to ask yourself "what can I do if I run yarn install --production
"? With the current package.json
you will not be able to do anything, not even, i.e. none of the commands here will work (AFAIK):
+ "scripts": {
+ "ci": "CI=true run-p flow lint-staged test",
+ "flow": "flow",
+ "lint": "eslint src --fix",
+ "lint-staged": "lint-staged",
+ "precommit": "lint-staged",
+ "stylelint": "stylelint 'src/**/*.css'",
+ "start": "node scripts/start.js",
+ "build": "node scripts/build.js",
+ "test": "node scripts/test.js --env=jsdom"
+ },
README.md
Outdated
|
||
```bash | ||
yarn run compile | ||
yarn run build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or simply yarn build
.
env[key] = process.env[key]; | ||
return env; | ||
}, { | ||
// Useful for determining whether we’re running in production mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think the inline documentation is too verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all from Create React App with as few modifications as possible.
@@ -0,0 +1,80 @@ | |||
'use strict'; | |||
|
|||
var path = require('path'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're no longer supporting older versions of Node, we should be able to replace all instances of var
with const
(and let
if needed).
@@ -0,0 +1,16 @@ | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
var paths = require('./paths'); | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many empty lines.
@Jalle19 let's look at the dependencies today when we meet face to face. |
src/index.js
Outdated
import React, {createElement} from 'react' | ||
import {render} from 'react-dom' | ||
import {AppContainer} from 'react-hot-loader' | ||
import {browserHistory} from 'react-router' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'browserHistory' is defined but never used.
+1 from me as long as |
1828fda
to
5d52394
Compare
/node_modules/ | ||
/dist/ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we committing the build folder to the repo? @crisu83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not?
* Bootstrap with Create React App * Add Stylefmt and Stylelint * Wrote tests with Jest * Fix Flow configuration * Upgrade to React Router v4 * Remove Node versions 4 and 5 from Travis build * Add Reselect and rewrote selectors * Fix Code Climate configuration * Remove unused .csslintrc * Remove unused routes.js * Update README.md * Add .eslintrc * Update Code Climate configuration * Improve types (#54) * Move components into a subdirectory * Simplify bootstrap * Fix import path * Move build dependencies * Fix hyperlink * Update documentation * Add /decls to .eslintignore
* Bootstrap with Create React App * Add Stylefmt and Stylelint * Wrote tests with Jest * Fix Flow configuration * Upgrade to React Router v4 * Remove Node versions 4 and 5 from Travis build * Add Reselect and rewrote selectors * Fix Code Climate configuration * Remove unused .csslintrc * Remove unused routes.js * Update README.md * Add .eslintrc * Update Code Climate configuration * Improve types (#54) * Move components into a subdirectory * Simplify bootstrap * Fix import path * Move build dependencies * Fix hyperlink * Update documentation * Add /decls to .eslintignore
Bootstrap project with Create React App instead of using custom configuration.
Todo before this can be merged
Things you might be wondering about
es2015
orstage-1
Babel presets? Adding these presets has severe performance implications, so we wanted to leave it up to the project to decide which presets it actually needs. See also Consider leaving out babel-preset-es2015 in development. facebook/create-react-app#435