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

Commit

Permalink
Merge branch 'master' into support-react-navigation-2.3
Browse files Browse the repository at this point in the history
* master:
  ⬆️ upgrades reactotron to latest version (#77)
  Fix typo and fix import path (#73)
  Remove unused import and update path (#72)
  Misc: Increment version to beta.2
  Update: replace sed command to plain js / fixed android path camelcase bug (#69)
  1.0.0-beta.1
  beta 0
  Changed version number
  Change bowser to beta (#64)
  • Loading branch information
gorhom committed Sep 4, 2018
2 parents da8e8de + 3aba06a commit 05bb48b
Show file tree
Hide file tree
Showing 7 changed files with 988 additions and 982 deletions.
12 changes: 8 additions & 4 deletions boilerplate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { merge, pipe, assoc, omit, __ } = require('ramda')
const { getReactNativeVersion } = require('./lib/react-native-version')
const os = require('os')

/**
* Is Android installed?
Expand Down Expand Up @@ -172,10 +171,15 @@ async function install (context) {
spinner.text = `▸ setting up splash screen`
spinner.start()
spinner.text = `▸ setting up splash screen: configuring`
const backupExtension = (os.platform() === 'darwin') ? '""' : ''
await system.run(`sed -i ${backupExtension} 's/SplashScreenPatch/${name}/g' ${process.cwd()}/patches/splash-screen/splash-screen.patch`, { stdio: 'ignore' })
const patchPath = `${process.cwd()}/patches/splash-screen/splash-screen.patch`
const patch = filesystem.read(patchPath)
const androidOldMainPathRegex = new RegExp('/android/app/src/main/java/com/SplashScreenPatch/MainActivity.java', 'g')
const androidNewMainPath = `/android/app/src/main/java/com/${name.toLowerCase()}/MainActivity.java`
const androidPatch = patch.replace(androidOldMainPathRegex, androidNewMainPath)
const patchForNewProject = androidPatch.replace(/SplashScreenPatch/g, name)
filesystem.write(patchPath, patchForNewProject)
spinner.text = `▸ setting up splash screen: cleaning`
await system.run(`git apply ${process.cwd()}/patches/splash-screen/splash-screen.patch`, { stdio: 'ignore' })
await system.run(`git apply ${patchPath}`, { stdio: 'ignore' })
filesystem.remove(`${process.cwd()}/patches/splash-screen`)
}
await patchSplashScreen()
Expand Down
4 changes: 2 additions & 2 deletions boilerplate/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"react-native-keychain": "3.0.0-rc.3",
"react-native-splash-screen": "3.0.6",
"react-navigation": "2.3.1",
"reactotron-mst": "2.0.0-beta.2",
"reactotron-react-native": "2.0.0-beta.2",
"reactotron-mst": "2.1.0",
"reactotron-react-native": "2.1.0",
"validate.js": "0.12.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions boilerplate/src/app/root-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "../i18n"
import * as React from "react"
import { setupRootStore } from "./setup-root-store"
import { StatefulNavigator } from "../navigation"
import { RootStore } from "../app/root-store"
import { RootStore } from "./root-store"
import { Provider } from "mobx-react"
import { BackButtonHandler } from "../navigation/back-button-handler"
import { contains } from "ramda"
Expand Down Expand Up @@ -39,7 +39,7 @@ export class RootComponent extends React.Component<{}, RootComponentState> {
render() {
const rootStore = this.state && this.state.rootStore

// Before we show the app, we have to wait for out state to be ready.
// Before we show the app, we have to wait for our state to be ready.
// In the meantime, don't render anything. This will be the background
// color set in native by rootView's background color.
//
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/src/navigation/stateful-navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { inject, observer } from "mobx-react"
// @ts-ignore: until they update @type/react-navigation
import { getNavigation, NavigationScreenProp, NavigationState } from "react-navigation"
import { RootNavigator } from "./root-navigator"
import { NavigationStore } from "../navigation/navigation-store"
import { NavigationStore } from "./navigation-store"

interface StatefulNavigatorProps {
navigationStore?: NavigationStore
Expand Down
Loading

0 comments on commit 05bb48b

Please sign in to comment.