Skip to content

Instantly share code, notes, and snippets.

@tylergaw
tylergaw / README.md
Last active December 5, 2019 02:18

What Is This?

We use Microsoft App Center CodePush for our React Native app at StreetCred

During the setup and usage process we abstracted a number of common tasks to scripts in package.json to help make our lives easier. package-scripts.json is a snippet of our app's package.json file.

documentation.md is a snippet from our app's README explaining the available scripts and reasoning behind some of the choices.

WIP

As of 2018-11-20 we're just getting CodePush in place. As we use it more and learn more about our needs, these will most likely change.

NOTE: Don't bother, use Android Studio instead of everything below. blah

Installing and Using an Android Emulator for React Native Apps

For this setup, we'll assume you are not running any version Android Studio.

Guides

  • Installation https://www.decoide.org/react-native/docs/android-setup.html
    • Review: Slightly outdated Android SDK install and usage docs, but Homebrew and the sdk guides you through the necessary changes
    • Cliffnotes:
      • Install JDK, install Android SDK, export sdk root env var in .bash_profile, install Java 8 if not installed

New Machine Software Setup

Just a few notes on the software I use to work.

My preferences macOS Software, configuration, and such

  • macOS Developer Tools. Attempt to run git --version and you'll be prompted to install them if you don't already have them
  • git - If you're using git daily, you probably want to install it with Homebrew and use that version instead of the default version that ships with macOS
  • GitHub Account
    • Generate a new SSH key and add it to your GH account. Guide
  • Install Homebrew - Package manager
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>work</title>
  <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
 
$(function() {
  $.jribbble.setToken('7c9209716855de040973271827d2777eaf5d86ee4dce71934cd4a12cc9312bed');

  $.jribbble.users('jtwinchester').shots({per_page: 36}).then(function(shots) {
    var html = [];

    shots.forEach(function(shot) {
      html.push('<li class="shots--shot">');
 html.push('<a href="'%20+%20shot.html_url%20+%20'" target="_blank">');</a>
// a) IIFE
const employmentFields = employmentInfo ? (() => {
const occupation = new TextInput({
fieldName: 'gwb-occupation',
label: 'Occupation',
targetId
});
const employer = new TextInput({
fieldName: 'gwb-employer',
// Create a new NSImage instance by any init method
var img = $.NSImage.alloc.initByReferencingFile(/*the image path*/);
// Don't use parens "()" when a method takes zero arguments
img.lockFocus;
// and
img.unlockFocus;

Node Dependency Conflict using Create React App and Groundwork.JS

(update: While this could still be an issue that effects other packages, Groundwork.JS is fixed as of 1.5.1. https://github.com/thegroundwork/groundwork.js/pull/55 Darren fixed it by moving the dependencies to proper spots)

I'm not sure if this is an issue with Create React App, or with Groundwork.JS, or just a "this is how the world works". Whatever the reason, the results are trouble.

The main issue; because npm has a flat(er) directory structure as of version 3.x, dependencies can be overwritten by subdependencies. This can cause breakage if a dependency relies on a certain version and cannot find it. Which I'll show an example of here.

Setup

pubdate author
2016-10-24
Tyler Gaw

How We Use Groundwork Collections on Developer Center

In October 2016 we launched a design and content realign of The Developer Center. As part of that work, we created two areas that make use of the Collections resource of The Groundwork API.

Where we use Collections

Groundwork.JS Usage Guide

Overview

Groundwork.js is a small library to assist developer when working with The Groundwork platform. It provides a consistent interface to our APIs and handles the intricacies of authentication for you.

Groundwork.js is specifically for use in the browser. You can load it directly from our CDN as a <script> tag or import it into your application via a UMD interface.

Examples