-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev environment setup #2
Changes from 18 commits
94623fc
21a5623
281ea74
8c62d6f
69dde0d
d53d1ca
7a225f5
f5d9009
2c0941c
64fd37b
f48d739
eac0d50
0b9f346
7f5965a
93f800a
1eb9562
8a66b7a
2ca52b7
91d4af8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"react" | ||
"env", | ||
"react", | ||
"stage-2" | ||
], | ||
"plugins": [ | ||
"transform-object-rest-spread", | ||
plugins: [ | ||
"react-hot-loader/babel" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# To use these environment variables run `yarn run config` | ||
|
||
# Used for absolute paths | ||
NODE_PATH=src | ||
|
||
# All environment variables need `REACT_APP_` as a prefix | ||
|
||
# Firebase: Not all of these will be used, it just depends on what we enable | ||
apiKey="apiKeyFromFirebase", | ||
authDomain="authDomainFromFirebase", | ||
databaseURL="databaseURLFromFirebase", | ||
projectId="projectIdFromFirebase", | ||
storageBucket="storageBucketFromFirebase", | ||
messagingSenderId="messagingSenderIdFromFirebase" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
**/*{.,-}min.js | ||
/public | ||
/config/** | ||
registerServiceWorker.js | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there something about service workers that eslint disagrees with? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, lines 2 and 3 are not needed anymore. The service worker is all over the place. It'm mainly so serve content offline. That is all is seems to do but that boilerplate from CRA. However, it is not styled in any way really, but i don't want to touch it since it is boilerplate from CRA |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,15 +3,30 @@ module.exports = { | |
"env": { | ||
"mocha": true, | ||
"node": true, | ||
"browser": true, | ||
"browser": true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol, you don't like commas on final lines? My linter typically does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No i do like commas on the final lines, im just not sure as to why some did not have it to begin with. Usually it formats on save and fixes stuff like this but oops |
||
}, | ||
"parser": "babel-eslint", | ||
"plugins": ["chai-friendly"], | ||
"rules": { | ||
"no-unused-expressions": 0, | ||
"no-control-regex": 0, | ||
"keyword-spacing": 0, | ||
"chai-friendly/no-unused-expressions": 2, | ||
|
||
"import/no-extraneous-dependencies": 0, | ||
"import/extensions": 0, | ||
"import/no-unresolved": 0, | ||
"import/prefer-default-export": 0, | ||
|
||
"jsx-quotes": [2, "prefer-single"], | ||
|
||
// For some reason, these lint errors came up and they were extreme style linting errors | ||
"react/jsx-filename-extension": 0, | ||
"react/destructuring-assignment": 0, | ||
"react/no-access-state-in-setstate": 0, | ||
"react/prefer-stateless-function": 0, | ||
"react/jsx-one-expression-per-line": 0, | ||
"react/jsx-wrap-multilines": 0, | ||
"react/require-default-props": 0, | ||
} | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,31 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Docs | ||
./docs/ | ||
# Jetbrains | ||
.idea/ | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
# dependencies | ||
/node_modules | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
# testing | ||
/coverage | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/*.map | ||
build/*.json | ||
build/*.js | ||
# production | ||
/build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be public now, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well actually you want to version the public folder because that contains you index.html and the service worker. CRA builds from the public folder into the build folder. Yeah it through me off the first time too |
||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
# Docs | ||
/docs | ||
|
||
# dotenv environment variables file | ||
# misc | ||
.DS_Store | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# dbdatagen | ||
devutils/dbdatagen/cpceed-firebase-admin-key.json | ||
devutils/dbdatagen/gen-uids.json | ||
devutils/dbdatagen/gen-script.json | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor | ||
*.swp | ||
.tern-project | ||
.tern-config | ||
.tern-port |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const rewireReactHotLoader = require('react-app-rewire-hot-loader') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, for stateful hot reloading in the development env |
||
|
||
/* config-overrides.js */ | ||
module.exports = function override (config, env) { | ||
config = rewireReactHotLoader(config, env) | ||
return config | ||
}; |
This file was deleted.
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.
Don't you typically have to pass some configuration options to
env
?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.
Nope. Works out of the box