Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Splash screen #24

Merged
merged 7 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions boilerplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,22 @@ async function install (context) {
await system.spawn('react-native link', { stdio: 'ignore' })
spinner.stop()

async function patchSplashScreen () {
spinner.text = `▸ setting up splash screen`
spinner.start()
spinner.text = `▸ setting up splash screen: installing package`
await system.run(`yarn add react-native-splash-screen`, { stdio: 'ignore' })
spinner.text = `▸ setting up splash screen: linking`
await system.spawn(`react-native link react-native-splash-screen`, { stdio: 'ignore' })
spinner.text = `▸ setting up splash screen: configuring`
await system.run(`sed -i '' 's/SplashScreenPatch/${name}/g' ${process.cwd()}/patches/splash-screen/splash-screen.patch`, { stdio: 'ignore' })
spinner.text = `▸ setting up splash screen: cleaning`
await system.run(`git apply ${process.cwd()}/patches/splash-screen/splash-screen.patch`, { stdio: 'ignore' })
filesystem.remove(`${process.cwd()}/patches/splash-screen`)
}
await patchSplashScreen()
spinner.stop()

// pass long the debug flag if we're running in that mode
const debugFlag = parameters.options.debug ? '--debug' : ''

Expand Down
Loading