artsy/emission

Name: emission

Owner: Artsy

Description: React Native Components

Created: 2016-02-24 11:36:24.0

Updated: 2018-05-23 17:57:30.0

Pushed: 2018-05-24 21:33:48.0

Homepage: null

Size: 23502

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Reactions ? Emissions

Emission is a collection of React Native Components which are consumed by Eigen. A writeup on how & why we made a lot of the repo decisions is on our blog here.

Inside Emission you will find:

Meta

This is a core Artsy Mobile OSS project, along with Energy, Eidolon, Eigen and Emergence.

Don't know what Artsy is? Check out this overview and more, or read our objc.io on team culture.

Want to know more about Emission? Read the mobile blog posts, or Emission's / React Native's specifically. Also check out the map to Emission to oriented yourself to the codebase.

Installation

Automated install:

Manual install

  1. Make sure to check out submodules with git submodule update --init
  2. Install Node.js, and Yarn: $ brew install node yarn
  3. Install file watcher used by React Native:
  4. $ brew install pcre
  5. $ brew link pcre
  6. $ brew install watchman --HEAD
  7. Install NPM modules: $ yarn install
  8. Install Pods: $ cd Example && bundle && bundle exec pod install
Running the project:
  1. Run $ yarn start from the top directory, which will:

  2. Clean the example app?s Xcode build dir.

  3. Start the example app?s React Native packager.

  4. Start the React Storybooks environment.

  5. Now from Xcode you can run the app in Example/Emission.xcworkspace.

  6. If you already have the app installed, you can run open -a Simulator to open the last sim, and then xcrun simctl launch booted net.artsy.Emission to open the app.

Daily Development

If you like git hooks, you could setup the following:

To use Storybooks, select “Open Storybook” from the “Developer” section of the root view in the app. You can also use the VSCode Storybooks plugin.


Using VS Code as an IDE

There is a comprehensive document covering our setup here.

Debugging

There is a comprehensive document covering the various options.

Updating Dependencies
  1. We vendor some data from other repositories that you will sometimes need to update. You can either update all of them with $ yarn run sync-externals or individually:
  2. The GraphQL schema of metaphysics that Relay uses to generate queries from: $ yarn run sync-schema
  3. The colors defined in Artsy?s style-guide: $ yarn run sync-colors
Understanding Relay

We have some debugging tip when using Relay.


Try quitting and restarting your node instance if you change something Relay-related and you run into this error:

ndled JS Exception: RelayQL: Unexpected invocation at runtime. Either the Babel transform was not set up, or it
ed to identify this call site. Make sure it is being used verbatim as `Relay.QL`
Deploying Emission

You must have Metaphysics checked out in a folder adjacent to Emission's code. So there should be ~/code/emission and ~/code/metaphysics.

  1. Ensure that the React version required by Emission has been published to our spec-repo. Assuming no breaking changes in RN's folder structures, you can run make update_specs_repos.
  2. Update the CHANGELOG file to reflect the version that will be released and commit it.
  3. Don't change the package.json version.
  4. For non-beta releases, use either npm version patch, npm version minor, or npm version major. For beta releases use npm version prerelease.
  5. If integrating in Eigen consult the docs on updating Emission
Automated Emission App Deploys

The Emission app (in Example/) is deployed automatically to TestFlight once a week through emission-nebula. See that repo for more details.

Resources

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.