This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2017 Bryan Keller (https://github.com/widget-) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppState } from 'react-native' | |
export const AppStateTypes = { | |
APP_RESUMED: '@appstate/RESUMED', | |
APP_BACKGROUNDED: '@appstate/BACKGROUNDED', | |
APP_INACTIVE: '@appstate/INACTIVE' | |
} | |
/** | |
* Store Enhancer that injects app state actions whenever the app state changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04287792788baac704e5f0b8c2db55c74a7e6f9dbc60302c97b853c52d550b0f2d4926bd19986db2463edf2b8c72911fd719adc7f65b66420fe310c2afacd8831e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REACT NATIVE IOS vs ANDROID FONT USE | |
Tested for React Native 0.41+ | |
IOS: | |
- Place the fonts in the assets and make sure they are bundled along | |
- On iOS, fontFamily in Text match the Font Family name as described in Font Book (macOS). Font weights can be specified exactly. | |
ANDROID: | |
On Android, there are two ways of using fonts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tsconfig.json | |
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "es6", | |
"noImplicitAny": false, | |
"outDir": "dist/", | |
"removeComments": true, | |
"sourceMap": true, | |
"watch": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add to index.js | |
exitOnSignal('SIGINT'); | |
exitOnSignal('SIGTERM'); | |
function exitOnSignal(signal) { | |
process.on(signal, function() { | |
console.log('\ncaught ' + signal + ', exiting'); | |
// perform all required cleanup | |
process.exit(1); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drone.yml for node js CI with npm login | |
# Don't forget to configure DRONE_SERVER and DRONE_SERVER | |
# Now create a secrets.yml (OUTSIDE of your repo!!) (see other file) | |
# then run drone secure --repo <drone_repo_name> --in <path>/secrets.yml | |
build: | |
unit_tests: | |
image: risingstack/alpine:3.3-v4.2.6-1.1.3 | |
commands: | |
- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
- npm install |