Skip to content

Kamile/TestRNMakeProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestRNMakeProject

This project and readme have been auto generated by react-native-make

Getting Started

Requirements

Make sure you have installed:

  • Git
  • XCode
  • Android SDK
  • node
    • yarn
    • react-native-cli
  • ruby
    • bundler (sudo gem install bundler)
  • transcrypt (brew install transcrypt)

Installation

git clone git@github.com:bamlab/project-name.git
cd project-name
bundle install
yarn
bundle exec pod repo update
cd ios && bundle exec pod install && cd ..

Configuration

Ask the password to a BAM's architect.

transcrypt -c aes-256-cbc -p '<password>'

Run the app

Launch the app in your simulator:

  • iOS: react-native run-ios --scheme TestRNMakeProject-Staging
  • Android: react-native run-android --variant=stagingDebug

Features

When you generated the repository with react-native-make the following feature must be present:

  • A repository should have been created at https://github.com/bamlab/project-name
  • Travis CI run your tests
  • An application have been created and deployed on appcenter
  • You can deploy automatically with fastlane to appcenter
  • You can deploy with codepush to staging too
  • We installed the following libraries for you:
    • @react-native-community/async-storage
    • react-native-localize
    • i18n-js
    • typesafe-actions
    • jest
    • prettier
    • eslint

Finding specific features location

To find where a feature is installed / used, run a search on the whole project using the tag

Name  Tag
Translations @translations
Redux @redux
Redux Persist @redux-persist
Redux Persist Sensitive @redux-persist-sensitive
React Navigation @react-navigation
CodePush @codepush
Firebase @firebase
Firebase Crashlytics @firebase-crashlytics
GraphQL @graphql
GraphQL Subscriptions @graphql-subscriptions
Storybook @storybook

Testing

You can run the tests with yarn test. This command will:

  • Run eslint on your project
  • Check the typescript types
  • Run the jest tests

You can run the jest tests in watch mode with:

yarn jest --watch

You can also get the coverage with:

yarn jest --coverage

Automatic generation

You can automatically generate files by running the following commands:

  • yarn plop atom : generate an empty atom
  • yarn plop module : generate a Redux module whose state contains value
  • yarn plop page : generate an empty page

Travis CI

If you are in the bamlab organisation, travis CI have been set up for you. It should run the yarn test command on each pull request and branch update.

Deploy

A staging environment have been created for you. This environment push the application on Appcenter.

You can find the pushed app at:

To deploy in staging, just run

./scripts/deploy.sh -t hard

There is few options on the deploy command. Please run the following command to have all usages:

./scripts/deploy.sh -h

CodePush

Most of the time, on staging, you didn't change anything in the native code. If you changed only javascript code, you can run:

./scripts/deploy.sh

Then the build should be faster as only the javascript code have been published.

To download updates from the application, just open it and click on the "check update" button.

Troubleshooting

Android: No value has been specified for property 'manifestOutputDirectory'.

In Android Studio: File > Settings > Experimental > Gradle -> uncheck "Only sync the active variant" checkbox.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors