Created
December 18, 2021 05:17
-
-
Save keith-kurak/9a65287fe60b91a76635b74c19cec7b8 to your computer and use it in GitHub Desktop.
06: Hello, deploy!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add files and bits needed to deploy and build apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add required bits to build iOS and/ or Android apps | |
// must have app identifiers/ package name/ build number/ version code | |
"ios": { | |
"bundleIdentifier": "com.company.changeme", | |
"supportsTablet": true, | |
"buildNumber": "1" | |
}, | |
"android": { | |
"adaptiveIcon": { | |
"foregroundImage": "./assets/adaptive-icon.png", | |
"backgroundColor": "#FFFFFF" | |
}, | |
"package": "com.company.changeme", | |
"versionCode": 1 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create this file, which points firebase hosting to the web build folder | |
"hosting": { | |
"public": "web-build", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"rewrites": [ | |
{ | |
"source": "**", | |
"destination": "/index.html" | |
} | |
], | |
"headers": [ | |
{ | |
"source": "/**", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "no-cache, no-store, must-revalidate" | |
} | |
] | |
}, | |
{ | |
"source": "**/*.@(jpg|jpeg|gif|png|svg|webp|js|css|eot|otf|ttf|ttc|woff|woff2|font.css)", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "max-age=604800" | |
} | |
] | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add command to deploy web app | |
"predeploy": "expo build:web", | |
"deploy-hosting": "npm run predeploy && firebase deploy --only hosting" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To publish to Expo for use in the Expo Go app only / also to publish an OTA update
expo publish
To build a binary app on Expo's servers
expo build:ios
orexpo build:android --type apk
(do apk to easily install on your phone)To build web version and publish to firebase hosting
yarn deploy-hosting