npm install
export NEW_PROJECT_NAME=YOUR_PROJECT_NAME
sed -i "" -e "s/r3sample/${NEW_PROJECT_NAME}/" package.json
sed -i "" -e "s/r3sample/${NEW_PROJECT_NAME}/" index.ios.js
sed -i "" -e "s/r3sample/${NEW_PROJECT_NAME}/" index.android.js
react-native upgrade
and select like this
Do you want to replace .gitignore? Answer y to replace, n to keep your version:
n
Do you want to replace android/app/BUCK? Answer y to replace, n to keep your version:
y
Do you want to replace android/app/build.gradle? Answer y to replace, n to keep your version:
y
Do you want to replace android/app/src/main/AndroidManifest.xml? Answer y to replace, n to keep your version:
y
Do you want to replace android/app/src/main/res/values/strings.xml? Answer y to replace, n to keep your version:
y
Do you want to replace android/settings.gradle? Answer y to replace, n to keep your version:
y
Do you want to replace app.json? Answer y to replace, n to keep your version:
y
"NEW_PROJECT_NAME" should be alphanumeric
rm -rf android/app/src/main/java/com/r3sample/ \
ios/r3sample-tvOS/ \
ios/r3sample-tvOSTests/ \
ios/r3sample.xcodeproj/ \
ios/r3sample/ \
ios/r3sampleTests/
rm -rf .git
git init
git add -A
git commit -m "Initial Commit"
npm run start-web-dev
and access to localhost:2200
react-native run-ios
Set your $ANDROID_HOME path
echo "sdk.dir=${ANDROID_HOME}" > android/local.properties
react-native run-android
npm test
if you got an error for testing, you have to install jest globally
npm install jest -g
compile files for web production
npm run build-web
after this, www directory will be generated
then upload www files to your production root
This package is depends on react-native-cli
So you have to install react-native-cli globally
npm install react-native-cli -g
- react
- react-native
- redux
- react-intl
- react-router
- react-router-native
if you want to set uikit, we highly recommends material-ui(for web) and NativeBase(for Native)
- material-ui
- NativeBase