-
Notifications
You must be signed in to change notification settings - Fork 81
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
docs(example-app): add create-react-app example app #206
Conversation
I wanted to note that in this PR I explicitly tell Jest to ignore |
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.
Question - Should we also .npmignore
the example folder?
Also, I'm seeing an issue with babel-jest
and react-scripts
that's keeping me from running the yarn scripts. Did you run into this? It seems like having babel-jest
somewhere outside the project directory (in this case in the parent) but also brought in by react-scripts
makes things not happy.
const path = require('path') | ||
|
||
// This is needed in order to correctly resolve React versions between the library & example app | ||
module.exports = override( |
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 going to be needed for any other (eventual) shared 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.
It shouldn't, as far as I'm aware react
notably causes issues if multiple instances are loaded and that's what this workaround is for.
ok I just reminded myself of this: we don't need to use
|
update: added |
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.
LGTM
Fixes #77
/example
using the Typescript template@trussworks/react-uswds
as a local dependencyGovBanner
inApp
to demo the lib is working correctly