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:
- An example app for building and running Emission's components with an Eigen-like API.
- An NPM module that relies on React Native and manages the components.
- A Podspec that wraps it all together for easy external usage in Eigen.
- State: production
- Point People: @alloy, @ashfurrow
- CI:
- Troubleshooting
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.
- Xcode
Automated install:
- OSS:
git clone https://github.com/artsy/emission.git && cd emission && make setup && make oss
- Artsy:
git clone https://github.com/artsy/emission.git && cd emission && make setup && make artsy
. Then look in 1password for the Eigen keys.
Manual install
-
Install file watcher used by React Native:
$ brew install watchman
-
Install NPM modules:
$ yarn install
-
Install Pods:
$ cd Example && bundle && bundle exec pod install
-
Run
$ yarn start
from the top directory, which will:- Clean the example app’s Xcode build dir.
- Start the example app’s React Native packager.
- Start the React Storybooks environment.
-
Now from Xcode you can run the app in
Example/Emission.xcworkspace
.
- If you already have the app installed, you can run
open -a Simulator
to open the last sim, and thenxcrun simctl launch booted net.artsy.Emission
to open the app. - If you run into any issues with the above commands oftentimes a full clean can help. Run
rm -rf node_modules; rm -rf Example/Pods; yarn install; cd Example; bundle exec pod install
and then repeat the steps above.
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.
There is a comprehensive document covering our setup here.
There is a comprehensive document covering the various options.
We vendor some data from other repositories that you will sometimes need to update. Notably the GraphQL schema of metaphysics that Relay uses to generate queries from: $ yarnsync-schema
Note: Deploys are mostly automated, these instructions should be valid but take a look at this issue if things break.
Note 2: If you're updating React Native, you're gonna have to do a lot of this stuff manually. See the makefile/alloy/orta for more info.
- Update the CHANGELOG file to reflect the version that will be released and commit it.
- Don't change the
package.json
version. - For non-beta releases, use either
yarn release patch
,yarn release minor
, oryarn release major
. For beta releases useyarn release prerelease
. - If integrating in Eigen consult the docs on updating Emission
The Emission app (in Example/
) is deployed automatically to TestFlight once a week through emission-nebula. See that repo for more details.
-
React Native:
-
Relay:
-
TypeScript:
-
Testing:
-
Flexbox:
-
React Native Storybooks:
-
React Native Debugger: