-
Notifications
You must be signed in to change notification settings - Fork 3
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
Split client and server into separate packages #223
Conversation
(note that it is still looking for the old CI tasks from |
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 think this looks great, @macfarlandian! Sets a good standard for app development going forward. @jovergaag should take a look, too, before we merge, but don't hold up on me.
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
Do note that there should only be one `yarn.lock` file for the entire repository; if one is created in your new package directory, you should delete it, make sure the directory is properly listed in the `workspaces` list, and re-run `yarn install`. |
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.
So although there are separate package.json
files per package, there is only a single resulting yarn.lock
file. And the possibility of conflicts between the two files gets smoothed out by Yarn Workspaces?
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.
yes ... if there are redundancies it "hoists" them to the root to avoid duplicate installs, and if there are multiple versions that's fine because that happens all the time in node anyway. We will get more mileage out of the hoisting once we have multiple React applications in here
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.
This is awesome. Very clean, definitely setting the standard! We will try to start moving the Pulse dashboard in this direction over time.
@@ -1,5 +1,7 @@ | |||
{ | |||
"extends": ["react-app", "airbnb", "plugin:prettier/recommended"], | |||
// unlike .eslintignore, these values will cascade |
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.
Cool.
@macfarlandian PS your code is beautiful 😻 |
Description of the change
Rearranges the code to create separate npm packages for the client and server applications, with a layer of multi-package tooling on top of it. It's a big PR, but the vast majority of it is just moving files to different directories with their contents unchanged. Salient changes:
package.json
and README now only address repo-wide concerns (linting, git hooks, scripts for running client and server together)I have verified:
yarn dev
works in each package on its ownBasically there should be no regression in application behavior or developer experience as a result of this change.
I think that I probably will not merge this PR until after the population over time feature is released — there aren't any PRs in flight, but because this lower priority I don't want it to cause any unforeseen issues. So I might merge in any additional changes that happen to support that release, but that shouldn't change anything significant here.
Type of change
Related issues
Checklists
Development
These boxes should be checked by the submitter prior to merging:
Code review
These boxes should be checked by reviewers prior to merging: