to update react-native in BBRN:
- update package.json name to
bbrn
react-native-git-upgrade 0.54.0
- will noticed that nothing happened
- do the following steps perform the actual upgrade
to update react-native in BBRN:
bbrn
react-native-git-upgrade 0.54.0
/** | |
* - check symlink in depencency and devDepency | |
* - if found, generate rn-cli-config.js | |
* - react-native start with rn-cli-config | |
*/ | |
const packageJson = require('./package.json'); | |
const fs = require('fs'); | |
const exec = require('child_process').execSync; | |
const RN_CLI_CONFIG_NAME = `rn-cli-config-with-links.js`; |
id imageInsets = tabItemLayout[@"props"][@"iconInsets"];
if (imageInsets && imageInsets != (id)[NSNull null])
{
id topInset = imageInsets[@"top"];
id leftInset = imageInsets[@"left"];
id bottomInset = imageInsets[@"bottom"];
id rightInset = imageInsets[@"right"];
CGFloat top = topInset != (id)[NSNull null] ? [RCTConvert CGFloat:topInset] : 0;
# change xcode project name from "BadNamedProject" to "GoodNamedProject" | |
# change code | |
grep -r 'BadNamedProject' -l --null . | xargs -0 sed -i '' 's#BadNamedProject#GoodNamedProject#g' | |
# change filename | |
find . -depth -name "*BadNamedProject*" -execdir sh -c 'mv {} $(echo {} | sed "s/BadNamedProject/GoodNamedProject/")' \; | |
function highlightStr(name, query) { | |
if (!query) | |
return [ | |
{ | |
str: name, | |
isHighlight: false | |
} | |
]; | |
const queryRegx = new RegExp(query, "ig"); |
// "react-native": "0.42.0", | |
// "react-navigation": "^1.0.0-beta.7" | |
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ |
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
function injectCSS(css) { | |
var style = document.createElement('style'); | |
style.innerHTML = css; | |
document.head.appendChild(style); | |
} | |
document.addEventListener('DOMContentLoaded', function() { | |
injectCSS('.header-widget {display: none}') |
document.querySelector('#printLink').addEventListener('click', function() { | |
var iframe = document.querySelector('.printLink-iframe'); | |
if (!iframe) { | |
iframe = document.createElement('div'); | |
iframe.style.display = 'none'; | |
iframe.classList.add('printLink-iframe'); | |
} | |
iframe.innerHTML = '<iframe src="/printLink-iframe"></iframe>'; | |
document.body.appendChild(iframe); |