Skip to content
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

feat(web+template): convert from fixed app to template, make it work on web #3

Merged
merged 13 commits into from
Nov 26, 2021

Conversation

mikehardy
Copy link
Collaborator

@mikehardy mikehardy commented Nov 25, 2021

npx react-native init ProjectName --template invertase/react-native-firebase-authentication-example
cd ProjectName
yarn jest
yarn eslint
yarn prettier
yarn android
yarn ios
yarn web

examine your android emulator, your ios simulator, and check http://localhost:3000

...everything should work

@Salakar 😎 😆

@mikehardy
Copy link
Collaborator Author

Huge kudos to @criszz77 for his work on the Luna template, this template is built by (mostly) programmatically slicing react-native-firebase on top of it.

There are a few things that are statically configured still (adding google plist file to pbxproj, adding FB example ids to android+ios config files) but otherwise this is just a scripted build on top of that template

@mikehardy
Copy link
Collaborator Author

https://github.com/invertase/react-native-firebase-authentication-example/tree/%40mikehardy/web-template/template/src/shims

and

alias: {
['@invertase/react-native-apple-authentication$']: path.resolve(
__dirname,
'src/shims/react-native-apple-authentication-web.ts'
),
['@react-native-firebase/app$']: path.resolve(__dirname, 'src/shims/firebase-app-web.ts'),
['@react-native-firebase/analytics$']: path.resolve(__dirname, 'src/shims/firebase-analytics-web.ts'),
['@react-native-firebase/auth$']: path.resolve(__dirname, 'src/shims/firebase-auth-web.ts'),
['@react-native-firebase/firestore$']: path.resolve(__dirname, 'src/shims/firebase-firestore-web.ts'),
['@react-native-google-signin/google-signin$']: path.resolve(__dirname, 'src/shims/google-signin-web.ts'),
['react-native-fbsdk-next$']: path.resolve(__dirname, 'src/shims/react-native-fbsdk-next-web.ts')

are the magic

@mikehardy mikehardy merged commit 428d7f9 into main Nov 26, 2021
@mikehardy mikehardy deleted the @mikehardy/web-template branch November 26, 2021 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant