Coder Social home page Coder Social logo

comeoninc / angular-react-native-seed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marclaval/angular-react-native-seed

0.0 1.0 0.0 103 KB

A seed project to create a native mobile application with Angular and React Native

Home Page: http://angular.github.io/react-native-renderer/

License: Apache License 2.0

JavaScript 70.95% Shell 6.44% TypeScript 22.61%

angular-react-native-seed's Introduction

angular-react-native-seed

A seed project to create a native mobile application with Angular and React Native

General documentation

http://angular.github.io/react-native-renderer/

Preparing your environment

  • Set up React Native for iOS and/or Android following Getting started and Android setup
  • Clone this repository or a fork of it
  • Install Gulp and React Native CLI globally: npm install -g gulp react-native-cli
  • Install local npm modules: npm install

Running scripts

Creating the sample project:

  • gulp init to create the react-native project

Android:

  • gulp start.android to launch the sample on the connected device or emulator, and watch sources for auto update (if enabled in F2/shake dev menu) use the Reload JS button after the initial red screen

iOS:

  • gulp start.ios to launch the sample on an emulator, and watch sources for auto update (it will fail the first due to initial compilation, simply restart it)
  • OR, gulp watch and open .dist/app/ngReactNative/ios/ngReactNative.xcodeproj in Xcode and hit Run

Running unit tests

gulp test.browser to run tests in Chrome

Running e2e tests

e2e tests are run with Protractor and Appium which need to be installed globally: npm install -g protractor appium

They can be run in dev mode or in CI mode. The CI mode is slow as it builds a full standalone application, but can be used in SauceLabs.

iOS

Dev mode

Open 3 terminals and then:

  • In the first: appium
  • In the second: gulp start.ios, wait for the application to be fully loaded
  • In the third: protractor protractor.conf.ios.dev.js You can modify the application or the tests, and run protractor again.

CI mode

Install xctool: brew install xctool Build the application: ./scripts/build_app_ios.sh
Then open 2 terminals:

  • In the first: appium
  • In the second: protractor protractor.conf.ios.ci.js

Android

Experimental for now, a hack is needed in Protractor for now (remove call to driver.manage().timeouts().setScriptTimeout(...) in lib/runner.js)

In the configuration of the virtual device, make sure that the checkbox Use the Host GPU is active

Dev mode

Open 3 terminals and then:

  • In the first: appium
  • In the second: gulp start.android, wait for the application to be fully loaded
  • In the third: protractor protractor.conf.android.dev.js

You can modify the application or the tests, and run protractor again.

CI mode

Build the application: ./scripts/build_app_android.sh Then open 2 terminals:

  • In the first: appium
  • In the second: protractor protractor.conf.android.ci.js

angular-react-native-seed's People

Contributors

marclaval avatar

Watchers

 avatar

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.