mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b7323c419 | ||
|
|
7a1410aca6 | ||
|
|
3a3ecc40d5 | ||
|
|
e72181447e | ||
|
|
96877a0e68 | ||
|
|
fa660c6392 | ||
|
|
37a05edbd2 | ||
|
|
2a5c9a1d89 | ||
|
|
ff1c6f98b1 | ||
|
|
4f5fe812d2 | ||
|
|
0d5fa74c1c | ||
|
|
01c78be640 | ||
|
|
be921792cc | ||
|
|
c732ca4a95 | ||
|
|
a76dbc50f5 | ||
|
|
b00f70033a |
+1
-1
@@ -1,7 +1,7 @@
|
||||
[ignore]
|
||||
|
||||
# We fork some components by platform.
|
||||
.*/*.android.js
|
||||
.*/*[.]android.js
|
||||
|
||||
# Ignore templates with `@flow` in header
|
||||
.*/local-cli/generator.*
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React"
|
||||
s.version = package['version']
|
||||
s.version = "0.32.1"
|
||||
s.summary = package['description']
|
||||
s.description = <<-DESC
|
||||
React Native apps are built using the React JS
|
||||
|
||||
@@ -232,7 +232,7 @@ RCT_EXPORT_MODULE()
|
||||
dispatch_async(RCTGetUIManagerQueue(), ^{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTUIManagerWillUpdateViewsDueToContentSizeMultiplierChangeNotification
|
||||
object:self];
|
||||
[self batchDidComplete];
|
||||
[self setNeedsLayout];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -424,8 +424,10 @@ dispatch_queue_t RCTGetUIManagerQueue(void)
|
||||
RCTShadowView *shadowView = self->_shadowViewRegistry[reactTag];
|
||||
RCTAssert(shadowView != nil, @"Could not locate shadow view with tag #%@", reactTag);
|
||||
|
||||
BOOL needsLayout = NO;
|
||||
if (!CGRectEqualToRect(frame, shadowView.frame)) {
|
||||
shadowView.frame = frame;
|
||||
needsLayout = YES;
|
||||
}
|
||||
|
||||
// Trigger re-layout when size flexibility changes, as the root view might grow or
|
||||
@@ -434,9 +436,13 @@ dispatch_queue_t RCTGetUIManagerQueue(void)
|
||||
RCTRootShadowView *rootShadowView = (RCTRootShadowView *)shadowView;
|
||||
if (rootShadowView.sizeFlexibility != sizeFlexibility) {
|
||||
rootShadowView.sizeFlexibility = sizeFlexibility;
|
||||
[self batchDidComplete];
|
||||
needsLayout = YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (needsLayout) {
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -451,7 +457,7 @@ dispatch_queue_t RCTGetUIManagerQueue(void)
|
||||
|
||||
shadowView.intrinsicContentSize = size;
|
||||
|
||||
[self batchDidComplete];
|
||||
[self setNeedsLayout];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-master
|
||||
VERSION_NAME=0.32.1
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
|
||||
@@ -78,7 +78,8 @@ void ProxyExecutor::loadApplicationScript(
|
||||
loadApplicationScript(
|
||||
m_executor.get(),
|
||||
jni::make_jstring(sourceURL).get());
|
||||
executeJSCallWithProxy(m_executor.get(), "flushedQueue", std::vector<folly::dynamic>());
|
||||
// We can get pending calls here to native but the queue will be drained when
|
||||
// we launch the application.
|
||||
}
|
||||
|
||||
void ProxyExecutor::setJSModulesUnbundle(std::unique_ptr<JSModulesUnbundle>) {
|
||||
|
||||
@@ -110,8 +110,16 @@ prebuilt_jar(
|
||||
visibility = ['//ReactAndroid/...',],
|
||||
)
|
||||
|
||||
remote_file(
|
||||
# This new rule will make the .jar file appear in the "right" location,
|
||||
# though that may change in the future
|
||||
export_file(
|
||||
name = 'robolectric-android-all-binary-jar',
|
||||
src = ':robolectric-android-all-binary-remote-jar',
|
||||
out = 'android-all-4.1.2_r1-robolectric-0.jar', # name defines filename used by robolectric in runtime
|
||||
)
|
||||
|
||||
remote_file(
|
||||
name = 'robolectric-android-all-binary-remote-jar',
|
||||
url = 'mvn:org.robolectric:android-all:jar:4.1.2_r1-robolectric-0',
|
||||
sha1 = 'aecc8ce5119a25fcea1cdf8285469c9d1261a352',
|
||||
)
|
||||
@@ -122,8 +130,14 @@ prebuilt_jar(
|
||||
visibility = ['//ReactAndroid/...',],
|
||||
)
|
||||
|
||||
remote_file(
|
||||
export_file(
|
||||
name = 'json-jar',
|
||||
src = ':json-remote-jar',
|
||||
out = 'json-20080701.jar', # name defines filename used by robolectric in runtime
|
||||
)
|
||||
|
||||
remote_file(
|
||||
name = 'json-remote-jar',
|
||||
url = 'mvn:org.json:json:jar:20080701',
|
||||
sha1 = 'd652f102185530c93b66158b1859f35d45687258',
|
||||
)
|
||||
@@ -134,8 +148,14 @@ prebuilt_jar(
|
||||
visibility = ['//ReactAndroid/...',],
|
||||
)
|
||||
|
||||
remote_file(
|
||||
export_file(
|
||||
name = 'tagsoup-jar',
|
||||
src = ':tagsoup-remote-jar',
|
||||
out = 'tagsoup-1.2.jar', # name defines filename used by robolectric in runtime
|
||||
)
|
||||
|
||||
remote_file(
|
||||
name = 'tagsoup-remote-jar',
|
||||
url = 'mvn:org.ccil.cowan.tagsoup:tagsoup:jar:1.2',
|
||||
sha1 = '639fd364750d7363c85797dc944b4a80f78fa684',
|
||||
)
|
||||
@@ -146,8 +166,14 @@ prebuilt_jar(
|
||||
visibility = ['//ReactAndroid/...',],
|
||||
)
|
||||
|
||||
remote_file(
|
||||
export_file(
|
||||
name = 'robolectric-shadows-binary-jar',
|
||||
src = ':robolectric-shadows-binary-remote-jar',
|
||||
out = 'shadows-core-3.0-16.jar', # name defines filename used by robolectric in runtime
|
||||
)
|
||||
|
||||
remote_file(
|
||||
name = 'robolectric-shadows-binary-remote-jar',
|
||||
url = 'https://repo1.maven.org/maven2/org/robolectric/shadows-core/3.0/shadows-core-3.0-16.jar',
|
||||
sha1 = '39d7a856bf91640b1a6d044333336a2b3f3c198f',
|
||||
)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var generate = require('../generate/generate');
|
||||
var fs = require('fs');
|
||||
|
||||
function android(argv, config, args) {
|
||||
return generate([
|
||||
'--platform', 'android',
|
||||
'--project-path', process.cwd(),
|
||||
'--project-name', args.projectName,
|
||||
], config);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'android',
|
||||
description: 'creates an empty android project',
|
||||
func: android,
|
||||
options: [{
|
||||
command: '--project-name [name]',
|
||||
default: () => JSON.parse(
|
||||
fs.readFileSync('package.json', 'utf8')
|
||||
).name,
|
||||
}],
|
||||
};
|
||||
@@ -31,6 +31,7 @@ export type Command = {
|
||||
};
|
||||
|
||||
const documentedCommands = [
|
||||
require('./android/android'),
|
||||
require('./server/server'),
|
||||
require('./runIOS/runIOS'),
|
||||
require('./runAndroid/runAndroid'),
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
@@ -8,7 +17,7 @@ describe('applyParams', () => {
|
||||
it('apply params to the string', () => {
|
||||
expect(
|
||||
applyParams('${foo}', {foo: 'foo'}, 'react-native')
|
||||
).toEqual('this.getResources().getString(R.strings.reactNative_foo)');
|
||||
).toEqual('getResources().getString(R.string.reactNative_foo)');
|
||||
});
|
||||
|
||||
it('use null if no params provided', () => {
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
const toCamelCase = require('lodash').camelCase;
|
||||
|
||||
module.exports = function applyParams(str, params, prefix) {
|
||||
@@ -7,7 +16,7 @@ module.exports = function applyParams(str, params, prefix) {
|
||||
const name = toCamelCase(prefix) + '_' + param;
|
||||
|
||||
return params[param]
|
||||
? `this.getResources().getString(R.strings.${name})`
|
||||
? `getResources().getString(R.string.${name})`
|
||||
: null;
|
||||
}
|
||||
);
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"version": "1000.0.0",
|
||||
"version": "0.32.1",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "BSD-3-Clause",
|
||||
"repository": {
|
||||
@@ -124,7 +124,7 @@
|
||||
"react-native": "local-cli/wrong-react-native.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "~15.3.0-rc.2"
|
||||
"react": "~15.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"absolute-path": "^0.0.0",
|
||||
@@ -207,7 +207,7 @@
|
||||
"jest-runtime": "~14.1.0",
|
||||
"mock-fs": "^3.11.0",
|
||||
"portfinder": "0.4.0",
|
||||
"react": "~15.3.0-rc.2",
|
||||
"react": "~15.3.0",
|
||||
"shelljs": "0.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
var React = require('React');
|
||||
var Prism = require('Prism');
|
||||
|
||||
var WEB_PLAYER_VERSION = '1.1.0';
|
||||
var WEB_PLAYER_VERSION = '1.2.4';
|
||||
|
||||
/**
|
||||
* Use the WebPlayer by including a ```ReactNativeWebPlayer``` block in markdown.
|
||||
@@ -59,7 +59,7 @@ var WebPlayer = React.createClass({
|
||||
style={{marginTop: 4}}
|
||||
width='880'
|
||||
height={this.parseParams(this.props.params).platform === 'android' ? '425' : '420'}
|
||||
data-src={`//npmcdn.com/react-native-web-player@${WEB_PLAYER_VERSION}/index.html${hash}`}
|
||||
data-src={`//cdn.rawgit.com/dabbott/react-native-web-player/gh-v${WEB_PLAYER_VERSION}/index.html${hash}`}
|
||||
frameBorder='0'
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user