TypeScript Objective-C JavaScript Ruby HTML Makefile Shell
Switch branches/tags
Clone or download
Latest commit 27eb829 Jul 20, 2018
Permalink
Failed to load latest commit information.
.storybook Fix up the JS files to our formatting May 25, 2017
.vscode Remove yaml extension Jun 19, 2018
Example 1.5.15 Jul 20, 2018
Pod 1.5.15 Jul 20, 2018
__mocks__ [messages] Adds tests for submitting Composer Sep 18, 2017
data handle errors while creating a credit card by showing hi-fidelity err… Jul 14, 2018
docs Adds deploy note. Jun 15, 2018
externals Merge branch 'develop-1.5.x' of https://github.com/artsy/emission int… May 29, 2018
images Fixes back arrow button asset for BidFlow. Jul 20, 2018
patches update to new version of graphql Jul 11, 2018
scripts Fixes typo in console.log. May 29, 2018
src Disables condition of sale link if the user has previously accepted t… Jul 20, 2018
storybook rename more files from CustomModal --> Modal Jul 11, 2018
.babelrc [package] Configure for our 1.5.0 fork. Feb 4, 2018
.eslintrc [Typescript] rename relay interfaces Feb 23, 2017
.gitattributes [git] Hide query maps from GitHub diffs. May 4, 2018
.gitignore [package] Configure for our 1.5.0 fork. Feb 4, 2018
.gitmodules [metaphysics] Update schema update workflow and no longer use fork. May 12, 2016
.gqlconfig [vscode] Enable graphql intellisense/autocomplete etc. Sep 4, 2017
.npmrc [npm] Do not ever write a package-lock.json file. Jan 13, 2018
.nvmrc [Dev] Ensure nvmrc is up to date Oct 5, 2017
.prettierignore [prettier] Don’t touch query map files. Apr 8, 2018
.stylelintrc [Consignments] Initial work on adding tracking throughout the app Nov 30, 2017
.travis.yml Ensures that JS is uploaded Jun 21, 2018
CHANGELOG.md Version bump. Jul 20, 2018
Emission.podspec use ruby api to retrieve spec details Apr 9, 2018
LICENSE Add ARArtistComponentViewController. May 18, 2016
Makefile Adds husky, and updates the makefile Jun 17, 2018
README.md Adds @ashfurrow as point person. Jul 11, 2018
dangerfile.ts Support forked PRs Jun 20, 2018
dependencyci.yml Fix dependency ci, and add types for the animations Sep 29, 2016
index.ios.js [Relay] Convert routes to query renderers. Sep 4, 2017
jsconfig.json [Testing] Simplify deps re:testing Aug 13, 2016
package.json 1.5.15 Jul 20, 2018
rn-cli.config.js [Dev] Updates to RN 52.0 and passes `yarn type-check` Mar 1, 2018
tsconfig.json remove dangerfile.ts from include May 28, 2018
tslint.json [Cleanup] Enable noUnusedLocals, remove all refs Dec 8, 2017
yarn.lock handle errors while creating a credit card by showing hi-fidelity err… Jul 14, 2018

README.md

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:

  • 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.

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:

  • 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

  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:

    • $ brew install pcre
    • $ brew link pcre
    • $ brew install watchman --HEAD
  4. Install NPM modules: $ yarn install

  5. Install Pods: $ cd Example && bundle && bundle exec pod install

    Running the project:

  6. 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.
  7. 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 then xcrun simctl launch booted net.artsy.Emission to open the app.

Daily Development

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

  • Lint and auto-fix new changes on commit: $ echo -e "#!/bin/sh\nyarn run lint-staged\n" > .git/hooks/pre-commit; chmod +x .git/hooks/pre-commit
  • Run type-checker before push: $ echo -e "#!/bin/sh\nyarn run type-check\n" > .git/hooks/pre-push; chmod +x .git/hooks/pre-push

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:
    • The GraphQL schema of metaphysics that Relay uses to generate queries from: $ yarn run sync-schema
    • The colors defined in Artsy’s style-guide: $ yarn run sync-colors

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

Unhandled JS Exception: RelayQL: Unexpected invocation at runtime. Either the Babel transform was not set up, or it
failed 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.

Note: Deploys are currently not working, these instructions are mostly valid but take a look at this issue when things break in step 4.

  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