Basic settings, linting and scripts, so you can start developing with ReactXP in VSCode straight away. The ESLint is set to test JavaScript only.
- VS Code
- VSCode extension - Flow Language Support
- NPM &
npm install -g yarn npm install -g create-rx-app cross-env- (Optional) Android SDK
- (Optional) Windows 10 SDK
- (Optional) iOS SDK
create-rx-app newprojectname --javascript- Start the android app via yarn start:android
- If it starts delete /react-fix and ./gitmodules
- If it doesn't(an error appears):
- Run
git submodule init; git submodule updatein this project - copy /react-fix/android to the main directory of your new project
- Change the project applicationID to the package name(in MainActivity.java) in /android/app/build.gradle
- Run
- Remove all the files(files only, without the folders)
- Copy the contents of this file's directory to the new project's directory
- Delete /jest
- Run
npm installto update everything
/android/app/src/main/res/values/strings.xml
/ios/<project>/Info.plist - CFBundleDisplayName
/ios/<project>/Base.lproj/LaunchScreen.xib
/web/template.html - title
/windows/<project>/Package.appxmanifest - everywhere except EntryPoint
/windows/<project>/Properties/AssemblyInfo.cs
Replace index or index.js with the new location
/package.json
/android/app/src/main/java/com/<project>/MainApplication.java
/ios/<project>/AppDelegate.m
/windows/<project>/MainReactNativeHost.cs
/web/index.hmr.js
- Disable the
@builtin TypeScript and JavaScriptextension for the workspace - Install ESLint
- Install React Native Tools
- If you have eslint installed globally you should remove it
- Generate a keystore file via:
cd ./android/app; keytool -genkey -v -keystore <name>.keystore -alias <alias> -keyalg RSA -keysize 2048 -validity 10000
- Add these variables in /android/gradle.properties with the correct data:
RELEASE_STORE_FILE=name.keystore
RELEASE_KEY_ALIAS=alias
RELEASE_STORE_PASSWORD=password
RELEASE_KEY_PASSWORD=password
- Run yarn build:android in the terminal
- Android -
yarn install:android - iOS -
?
- Android
- If you would like to use the
yarn emulator:androidcommand you need to have previously created an AVD with name Nexus
- If you would like to use the
- Android -
yarn clean:android - iOS -
?