-
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
React web app init #24
Changes from all commits
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
"busboy-body-parser": "^0.3.2", | ||
"connect-busboy": "0.0.2", | ||
"dateformat": "^3.0.3", | ||
"eslint": "^5.15.0", | ||
"eslint": "^7.11.0", | ||
"express": "^4.16.4", | ||
"express-fileupload": "^1.1.1-alpha.3", | ||
"firebase-admin": "^9.4.1", | ||
|
@@ -44,7 +44,7 @@ | |
"ts-node": "^8.8.1", | ||
"tsc": "^1.20150623.0", | ||
"twilio": "^3.41.1", | ||
"typescript": "^3.8.3", | ||
"typescript": "^4.1.2", | ||
"umzug": "^2.3.0", | ||
"uuid": "^3.3.2" | ||
}, | ||
|
@@ -62,12 +62,12 @@ | |
"supertest": "^4.0.2" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"build": "tsc && (cd ./web && yarn run 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. We may want to clean this up in the future but I don't know enough to know best practices. I found a few variations but pulled some inspiration from this: https://medium.com/codeduck/a-real-world-project-typescript-express-and-react-4701c0458e9c The gist of it is that we compile the minified typescript and then move that to the /build folder to serve up from the same output as the server. |
||
"deps": "docker-compose -f docker-compose.deps.yml up", | ||
"test": "docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit", | ||
"test:local": "yarn run build && node --inspect=0.0.0.0:9228 built/test-run.js", | ||
"test:local": "yarn run build && node --inspect=0.0.0.0:9228 build/test-run.js", | ||
"start": "nodemon", | ||
"start:prod": "node built/server.js" | ||
"start:prod": "node build/server.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -76,6 +76,5 @@ | |
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"homepage": "https://bitbucket.org/kkendall33/carswaddleserver#readme", | ||
"description": "" | ||
"homepage": "https://bitbucket.org/kkendall33/carswaddleserver#readme" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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 not super happy with this because it means spinning up two distinct servers when working in dev but the react-scripts people are pretty inflexible about having
react-scripts build
produce dev code. Building for production is pretty fast but adding 5-10 seconds to every code change (even when nothing changed on the web app) seemed like a bit much. See: facebook/create-react-app#790