mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-30 14:02:44 +08:00
[SampleApp] adding unsynced changes from PR #3025
This commit is contained in:
@@ -53,22 +53,21 @@ To install a snapshot version of the framework code in your local Maven repo:
|
||||
|
||||
## Running the examples
|
||||
|
||||
To run the Sample app:
|
||||
To run the UIExplorer app:
|
||||
|
||||
```bash
|
||||
cd react-native
|
||||
./gradlew :Examples:SampleApp:android:app:installDebug
|
||||
./gradlew :Examples:UIExplorer:android:app:installDebug
|
||||
# Start the packager in a separate shell:
|
||||
# Make sure you ran npm install
|
||||
./packager/packager.sh
|
||||
# Open SampleApp in your emulator, Menu button -> Reload JS should work
|
||||
# Open UIExplorer in your emulator, Menu button -> Reload JS should work
|
||||
```
|
||||
|
||||
You can run any other sample app the same way, e.g.:
|
||||
|
||||
```bash
|
||||
./gradlew :Examples:Movies:android:app:installDebug
|
||||
./gradlew :Examples:UIExplorer:android:app:installDebug
|
||||
```
|
||||
|
||||
## Building from Android Studio
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('React Yeoman Generators', function() {
|
||||
'AppRegistry.registerComponent(\'TestApp\', () => TestApp);'
|
||||
);
|
||||
|
||||
assert.noFileContent('index.ios.js', 'SampleApp');
|
||||
assert.noFileContent('index.ios.js', '<%= name %>');
|
||||
});
|
||||
|
||||
it('replaces vars in index.android.js', function() {
|
||||
@@ -66,7 +66,7 @@ describe('React Yeoman Generators', function() {
|
||||
'AppRegistry.registerComponent(\'TestApp\', () => TestApp);'
|
||||
);
|
||||
|
||||
assert.noFileContent('index.ios.js', 'SampleApp');
|
||||
assert.noFileContent('index.ios.js', '<%= name %>');
|
||||
});
|
||||
|
||||
it('composes with ios generator', function() {
|
||||
@@ -218,14 +218,14 @@ describe('React Yeoman Generators', function() {
|
||||
var appDelegate = 'ios/TestAppIOS/AppDelegate.m';
|
||||
|
||||
assert.fileContent(appDelegate, 'moduleName:@"TestAppIOS"');
|
||||
assert.noFileContent(appDelegate, 'SampleApp');
|
||||
assert.noFileContent(appDelegate, '<%= name %>');
|
||||
});
|
||||
|
||||
it('replaces vars in LaunchScreen.xib', function() {
|
||||
var launchScreen = 'ios/TestAppIOS/Base.lproj/LaunchScreen.xib';
|
||||
|
||||
assert.fileContent(launchScreen, 'text="TestAppIOS"');
|
||||
assert.noFileContent(launchScreen, 'SampleApp');
|
||||
assert.noFileContent(launchScreen, '<%= name %>');
|
||||
});
|
||||
|
||||
it('replaces vars in TestAppIOSTests.m', function() {
|
||||
@@ -233,7 +233,7 @@ describe('React Yeoman Generators', function() {
|
||||
|
||||
assert.fileContent(tests, '@interface TestAppIOSTests : XCTestCase');
|
||||
assert.fileContent(tests, '@implementation TestAppIOSTests');
|
||||
assert.noFileContent(tests, 'SampleApp');
|
||||
assert.noFileContent(tests, '<%= name %>');
|
||||
});
|
||||
|
||||
it('replaces vars in project.pbxproj', function() {
|
||||
@@ -243,7 +243,7 @@ describe('React Yeoman Generators', function() {
|
||||
assert.fileContent(pbxproj, 'TestAppIOS.app');
|
||||
assert.fileContent(pbxproj, 'TestAppIOSTests.xctest');
|
||||
|
||||
assert.noFileContent(pbxproj, 'SampleApp');
|
||||
assert.noFileContent(pbxproj, '<%= name %>');
|
||||
});
|
||||
|
||||
it('replaces vars in xcscheme', function() {
|
||||
@@ -254,7 +254,7 @@ describe('React Yeoman Generators', function() {
|
||||
assert.fileContent(xcscheme, '"TestAppIOSTests.xctest"');
|
||||
assert.fileContent(xcscheme, '"TestAppIOSTests"');
|
||||
|
||||
assert.noFileContent(xcscheme, 'SampleApp');
|
||||
assert.noFileContent(xcscheme, '<%= name %>');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ TEMP=$(mktemp -d /tmp/react-native-XXXXXXXX)
|
||||
export REACT_PACKAGER_LOG="$TEMP/server.log"
|
||||
|
||||
# To make sure we actually installed the local version
|
||||
# of react-native, we will create a temp file inside SampleApp
|
||||
# of react-native, we will create a temp file inside the template
|
||||
# and check that it exists after `react-native init`
|
||||
MARKER=$(mktemp $ROOT/local-cli/generator-ios/templates/main/XXXXXXXX)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user