Skip to content

Commit 6c654c0

Browse files
committed
Merge pull request #12 from taskrabbit/upgrade
Upgrade
2 parents 1072b62 + b514bcc commit 6c654c0

File tree

17 files changed

+145
-183
lines changed

17 files changed

+145
-183
lines changed

.babelrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"plugins": [
3+
"syntax-async-functions",
4+
"syntax-class-properties",
5+
"syntax-trailing-function-commas",
6+
"transform-class-properties",
7+
"transform-es2015-arrow-functions",
8+
"transform-es2015-block-scoping",
9+
"transform-es2015-classes",
10+
"transform-es2015-computed-properties",
11+
"transform-es2015-constants",
12+
"transform-es2015-destructuring",
13+
["transform-es2015-modules-commonjs", {"strict": false, "allowTopLevelThis": true}],
14+
"transform-es2015-parameters",
15+
"transform-es2015-shorthand-properties",
16+
"transform-es2015-spread",
17+
"transform-es2015-template-literals",
18+
"transform-flow-strip-types",
19+
"transform-object-assign",
20+
"transform-object-rest-spread",
21+
"transform-react-display-name",
22+
"transform-react-jsx",
23+
"transform-regenerator",
24+
"transform-es2015-for-of"
25+
],
26+
}

.flowconfig

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,24 @@
77
# Some modules have their own node_modules with overlap
88
.*/node_modules/node-haste/.*
99

10-
# Ignore react-tools where there are overlaps, but don't ignore anything that
11-
# react-native relies on
12-
.*/node_modules/react-tools/src/React.js
13-
.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
14-
.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
15-
.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
16-
10+
# Ugh
11+
.*/node_modules/babel.*
12+
.*/node_modules/babylon.*
13+
.*/node_modules/invariant.*
14+
15+
# Ignore react and fbjs where there are overlaps, but don't ignore
16+
# anything that react-native relies on
17+
.*/node_modules/fbjs-haste/.*/__tests__/.*
18+
.*/node_modules/fbjs-haste/__forks__/Map.js
19+
.*/node_modules/fbjs-haste/__forks__/Promise.js
20+
.*/node_modules/fbjs-haste/__forks__/fetch.js
21+
.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js
22+
.*/node_modules/fbjs-haste/core/isEmpty.js
23+
.*/node_modules/fbjs-haste/crypto/crc32.js
24+
.*/node_modules/fbjs-haste/stubs/ErrorUtils.js
25+
.*/node_modules/react-haste/React.js
26+
.*/node_modules/react-haste/renderers/dom/ReactDOM.js
27+
.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
1728

1829
# Ignore commoner tests
1930
.*/node_modules/commoner/test/.*
@@ -22,7 +33,10 @@
2233
.*/react-tools/node_modules/commoner/lib/reader.js
2334

2435
# Ignore jest
25-
.*/react-native/node_modules/jest-cli/.*
36+
.*/node_modules/jest-cli/.*
37+
38+
# Ignore Website
39+
.*/website/.*
2640

2741
[include]
2842

@@ -34,13 +48,16 @@ module.system=haste
3448

3549
munge_underscores=true
3650

51+
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
52+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'
53+
3754
suppress_type=$FlowIssue
3855
suppress_type=$FlowFixMe
3956
suppress_type=$FixMe
4057

41-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
42-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
58+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
59+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
4360
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4461

4562
[version]
46-
0.14.0
63+
0.18.1

.gitignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,18 @@ DerivedData
2121
*.ipa
2222
*.xcuserstate
2323
project.xcworkspace
24-
Pods
24+
25+
# Android/IJ
26+
#
27+
.idea
28+
.gradle
29+
local.properties
2530

2631
# node.js
2732
#
2833
node_modules/
2934
npm-debug.log
3035

31-
/testbuild
36+
# Custom
37+
Pods
38+
/testbuild

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ before_install:
1313
- which nvm || curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
1414
- export NVM_DIR=~/.nvm
1515
- source ~/.nvm/nvm.sh --install
16-
- nvm install 4.0
16+
- nvm install 4.2.3
1717
- brew update
1818
- brew reinstall xctool
1919
- brew reinstall watchman

App/Navigation/NavigationBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var {
88

99
var cssVar = require('../Lib/cssVar');
1010

11-
var NavigatorNavigationBarStyles = require('NavigatorNavigationBarStyles');
11+
var NavigatorNavigationBarStyles = require('../Platform/NavigatorNavigationBarStyles');
1212
var NavigationBarRouteMapper = require('../Navigation/NavigationBarRouteMapper');
1313

1414
var stacksEqual = function(one, two, length) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('NavigatorNavigationBarStylesIOS');

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ There is a server that the app hits for data. The data is only stored in memory,
2020

2121
In the `server` directory
2222

23-
* Install nvm and node-4.0.0
23+
* Install nvm and node-4.2.3
2424
* Install dependencies: `npm install`
2525
* Run it: `npm start`
2626

ios/Sample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@
123123
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
124124
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
125125
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
126-
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
127-
00E356F21AD99517003FC87E /* SampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SampleTests.m; sourceTree = "<group>"; };
128126
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
129127
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
130128
13B07F961A680F5B00A75B9A /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -212,23 +210,6 @@
212210
name = Products;
213211
sourceTree = "<group>";
214212
};
215-
00E356EF1AD99517003FC87E /* SampleTests */ = {
216-
isa = PBXGroup;
217-
children = (
218-
00E356F21AD99517003FC87E /* SampleTests.m */,
219-
00E356F01AD99517003FC87E /* Supporting Files */,
220-
);
221-
path = SampleTests;
222-
sourceTree = "<group>";
223-
};
224-
00E356F01AD99517003FC87E /* Supporting Files */ = {
225-
isa = PBXGroup;
226-
children = (
227-
00E356F11AD99517003FC87E /* Info.plist */,
228-
);
229-
name = "Supporting Files";
230-
sourceTree = "<group>";
231-
};
232213
139105B71AF99BAD00B5F7CC /* Products */ = {
233214
isa = PBXGroup;
234215
children = (
@@ -327,7 +308,6 @@
327308
D36DCD921BD4A91C00B3EB2F /* Config */,
328309
13B07FAE1A68108700A75B9A /* Sample */,
329310
832341AE1AAA6A7D00B99B32 /* Libraries */,
330-
00E356EF1AD99517003FC87E /* SampleTests */,
331311
83CBBA001A601CBA00E9B192 /* Products */,
332312
30AE60BBEF6F20AE3A411389 /* Pods */,
333313
62C2C37584A469E6008CF501 /* Frameworks */,
@@ -381,7 +361,7 @@
381361
13B07F8C1A680F5B00A75B9A /* Frameworks */,
382362
13B07F8E1A680F5B00A75B9A /* Resources */,
383363
DF35A678DD70FEB3ABFDEA69 /* Copy Pods Resources */,
384-
D32D268A1BD4AFC8007753B2 /* ShellScript */,
364+
D32D268A1BD4AFC8007753B2 /* Bundle React Native code and images */,
385365
B91827D077A8C198AC93F32E /* Embed Pods Frameworks */,
386366
);
387367
buildRules = (
@@ -601,18 +581,19 @@
601581
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
602582
showEnvVarsInLog = 0;
603583
};
604-
D32D268A1BD4AFC8007753B2 /* ShellScript */ = {
584+
D32D268A1BD4AFC8007753B2 /* Bundle React Native code and images */ = {
605585
isa = PBXShellScriptBuildPhase;
606586
buildActionMask = 2147483647;
607587
files = (
608588
);
609589
inputPaths = (
610590
);
591+
name = "Bundle React Native code and images";
611592
outputPaths = (
612593
);
613594
runOnlyForDeploymentPostprocessing = 0;
614595
shellPath = /bin/sh;
615-
shellScript = "if [ \"${PLATFORM_NAME}\" != \"iphonesimulator\" ]; then\n source ~/.nvm/nvm.sh\n cd ${PROJECT_DIR}/.. && react-native bundle --minify\nfi";
596+
shellScript = "if [ \"${CONFIGURATION}\" == \"Debug\" ]\nthen\nBUNDLECONFIG=Debug\nelse\nBUNDLECONFIG=Release\nrm -rf $TMPDIR/react-*\nfi\n\nCONFIGURATION=$BUNDLECONFIG ../node_modules/react-native/packager/react-native-xcode.sh";
616597
};
617598
DF35A678DD70FEB3ABFDEA69 /* Copy Pods Resources */ = {
618599
isa = PBXShellScriptBuildPhase;

ios/Sample/AppDelegate.m

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3131
* on the same Wi-Fi network.
3232
*/
3333

34-
// jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"];
34+
// jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
3535

3636
/**
3737
* OPTION 2
@@ -47,22 +47,23 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4747

4848

4949
#ifdef TEST_ENVIRONMENT
50-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:9091/index.ios.bundle?platform=ios"];
50+
// different port
51+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:9091/index.ios.bundle?platform=ios&dev=true"];
5152
#else
52-
#if TARGET_IPHONE_SIMULATOR
53-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"];
54-
#else
55-
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
56-
#endif
53+
#if TARGET_IPHONE_SIMULATOR
54+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
55+
#else
56+
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
57+
#endif
5758
#endif
5859

5960
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
6061
moduleName:@"Sample"
6162
initialProperties:nil
6263
launchOptions:launchOptions];
63-
64+
6465
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
65-
UIViewController *rootViewController = [[UIViewController alloc] init];
66+
UIViewController *rootViewController = [UIViewController new];
6667
rootViewController.view = rootView;
6768
self.window.rootViewController = rootViewController;
6869
[self.window makeKeyAndVisible];

ios/SampleTests/Info.plist

Lines changed: 0 additions & 24 deletions
This file was deleted.

ios/SampleTests/SampleTests.m

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)