Move react-native template

Summary: This diff moves the React Native template from `local-cli/templates/HelloWorld` to `template`. Keeping it in the react-native repo will allow us to make changes to the template and version it together with react-native, instead of moving it out into a separate repo and trying to keep the template in sync with RN.

Reviewed By: TheSavior

Differential Revision: D13372949

fbshipit-source-id: e68e267b4dcf6384535d7b48fc11e297a12e9676
This commit is contained in:
Christoph Nakazawa 2018-12-07 04:47:03 -08:00 committed by Facebook Github Bot
parent 9d3f598c2c
commit 896bb8a21e
57 changed files with 8 additions and 8 deletions

View File

@ -3,7 +3,7 @@
.*/*[.]android.js
; Ignore templates for 'react-native init'
.*/local-cli/templates/.*
<PROJECT_ROOT>/template/.*
; Ignore the Dangerfile
<PROJECT_ROOT>/bots/dangerfile.js

View File

@ -3,7 +3,7 @@
.*/*[.]ios.js
; Ignore templates for 'react-native init'
.*/local-cli/templates/.*
<PROJECT_ROOT>/template/.*
; Ignore the Dangerfile
<PROJECT_ROOT>/bots/dangerfile.js

View File

@ -95,8 +95,8 @@ function e2e_suite() {
# To make sure we actually installed the local version
# of react-native, we will create a temp file inside the template
# and check that it exists after `react-native init
IOS_MARKER="$(mktemp "$ROOT"/local-cli/templates/HelloWorld/ios/HelloWorld/XXXXXXXX)"
ANDROID_MARKER="$(mktemp "$ROOT"/local-cli/templates/HelloWorld/android/XXXXXXXX)"
IOS_MARKER="$(mktemp "$ROOT"/template/ios/HelloWorld/XXXXXXXX)"
ANDROID_MARKER="$(mktemp "$ROOT"/template/android/XXXXXXXX)"
# install CLI
cd react-native-cli

View File

@ -32,9 +32,9 @@
},
"testRegex": "/__tests__/.*-test\\.js$",
"testPathIgnorePatterns": [
"Libraries/Renderer",
"/node_modules/",
"local-cli/templates/",
"<rootDir>/template",
"Libraries/Renderer",
"RNTester/e2e"
],
"haste": {

View File

@ -35,10 +35,10 @@ const TEMP = exec('mktemp -d /tmp/react-native-XXXXXXXX').stdout.trim();
// of react-native, we will create a temp file inside the template
// and check that it exists after `react-native init
const MARKER_IOS = exec(
`mktemp ${ROOT}/local-cli/templates/HelloWorld/ios/HelloWorld/XXXXXXXX`,
`mktemp ${ROOT}/template/ios/HelloWorld/XXXXXXXX`,
).stdout.trim();
const MARKER_ANDROID = exec(
`mktemp ${ROOT}/local-cli/templates/HelloWorld/android/XXXXXXXX`,
`mktemp ${ROOT}/template/android/XXXXXXXX`,
).stdout.trim();
const numberOfRetries = argv.retries || 1;
let SERVER_PID;