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

Commit

Permalink
Merge pull request #24 from infinitered/splash-screen
Browse files Browse the repository at this point in the history
Splash screen
  • Loading branch information
leonskim authored May 24, 2018
2 parents fbf6aea + 3294861 commit 00f23b5
Show file tree
Hide file tree
Showing 2 changed files with 30,536 additions and 0 deletions.
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

0 comments on commit 00f23b5

Please sign in to comment.