The plan is to incorporate this fork of create-react-app and how to use it within the frontier-cli.
That being said, if you want to use our fork "manually", then here is how you do it.
-
Make sure you are authenticated with Artifactory
See https://beta.familysearch.org/frontier/docs/getting-started/setup#setting-up-artifactory
-
Run the following command
npx create-react-app --use-npm --template @fs/cra-template --scripts-version @fs/react-scripts ${your-app-name}
If you have cloned this repo and made changes locally and want to test them before committing and publishing here is how.
- Clone this repo and make any changes needed in
./packages/react-scripts/
- Change directories to where you want a brand new app to be created in (don't run step 3 in an existing repo)
- Run the following command
npx create-react-app --use-npm --template @fs/cra-template --scripts-version file:${relativePathToYourClonedCreateReactAppRepo}/packages/react-scripts ${your-app-name}
- All development will be done from the frontierMaster branch
- Branch off of frontierMaster for any feature/bug fixes
- PRs will be made into the frontierMaster branch
When we are ready to pull in changes from Facebook, here are the steps
- Make a PR from facebook's master (main) into our fork's master. This url SHOULD be what you want... please verify before blindly doing anything
- https://github.com/fs-webdev/create-react-app/compare/master...facebook:main
- DO NOT SQUASH THE COMMITS when merging the PR. We need to be able to checkout a specific commit later in our steps
- Locally, check out the master branch and do a
git pull
- Find facebook's latest release https://github.com/facebook/create-react-app/releases
- Find the commit hash corresponding to the release that you want incorporated into our fork.
- Checkout our develop branch
- Run
git merge ${HASH_OF_RELEASE_YOU_WANT}
- Fix any merge conflicts
- Bump the 'upstreamVersion' in packages/react-scripts/package.json to match the release of facebook's react-scripts that you merged to
- Cut a release (follow steps up above)