Giter Club home page Giter Club logo

react-native-white-label's Introduction

React Native White Label Module Based Application Generator

Credits

Based on a tutorial by Amedo Zucchetti

Running this code

  • Clone the repository
  • Run cd react-native-white-label/whitelabel to navigate to the project repository
  • Run npm i to install the node dependencies
IOS
  • Make sure you have XCode, XCode Developer tools and a simulator set up
  • Run npm run install:ios
  • Run npm run ios to launch the application on your IOS simulator (this might take a while)
Android
  • Make sure you have Android Studio, and an android emulator installed
  • Make sure you have followed the React Native environment setup guide
  • Run npm run install:keygen and answer the questions when prompted
  • Run npm run android to launch the application on your Android Emulator

White Label Configuration

The white-label configuration script allows to configure the whitelabel project to use a specific combination of modules and a specific theme, without directly changing the source code. It can be run from the root directory with

./wl-configure.sh -a whitelabel -m Foo,Baz -t solarized-dark

It supports the following flags

  • a: The name of the project to configure. whitelabel will configure the whitelabel directory. Other names will configure app-<name> projects; for instance, -a test will configure project app-test.
  • m: List of comma-separated modules to be used. These modules must be present in the modules directory. The order provided is the order with which modules will be exported, so -m Foo,Bar is different from -m Bar,Foo.
  • t: Theme to use in the app. It must be one present in the theme directory.

White-label generation

The white-label generation allows to generate projects (new directories) based on whitelabel, with a particular configuration, display name and bundle id. This allows to install on the same device multiple applications originating from the whitelabel one.

The generation can be done with

./wl-generate.sh -a test -d "Test" -b com.test -m Baz,Bar,Foo -t solarized-light

and will procude a new directory (or override the existing) app-<name>. In our example, it will generate directory app-test. The script supports the following flags

  • a: Name of the project to generate for -a name, the project app-name will be created. It cannot be whitelabel.
  • d: Display name for the application, will be visible under the app icon on the device.
  • b: Bundle identifier for the app. It must consist of dot-separated alpha-numeric characters. It should be unique for every application and it should not be com.whitelabel (the default for the whitelabel project), or two app may clash.
  • m: List of comma-separated modules to be used. These modules must be present in the modules directory. The order provided is the order with which modules will be exported, so -m Foo,Bar is different from -m Bar,Foo.
  • t: Theme to use in the app. It must be one present in the theme directory.

react-native-white-label's People

Contributors

eoanodea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

heldinho gpolo3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.