From 90f15940fa913c957e73d997d358327413b9281b Mon Sep 17 00:00:00 2001 From: Dave Sibiski Date: Sat, 23 May 2015 16:28:04 -0400 Subject: [PATCH 1/2] Adds validation check for "React" package name - "React" is a reserve word and cannot be used as a project name since it will break the Sample app when generated --- react-native-cli/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/react-native-cli/index.js b/react-native-cli/index.js index 871a78b98..e7a084ab0 100755 --- a/react-native-cli/index.js +++ b/react-native-cli/index.js @@ -65,6 +65,15 @@ function validatePackageName(name) { ); process.exit(1); } + + if (name === 'React') { + console.error( + '"%s" is not a valid name for a project. Please do not use the reserve ' + + 'word "React".', + name + ); + process.exit(1); + } } function init(name) { From eb3bdd997e70d1efa591013ed23f69874e9fb755 Mon Sep 17 00:00:00 2001 From: Dave Sibiski Date: Sat, 23 May 2015 18:59:33 -0400 Subject: [PATCH 2/2] Fixes typo --- react-native-cli/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-native-cli/index.js b/react-native-cli/index.js index e7a084ab0..d8dc54757 100755 --- a/react-native-cli/index.js +++ b/react-native-cli/index.js @@ -68,8 +68,8 @@ function validatePackageName(name) { if (name === 'React') { console.error( - '"%s" is not a valid name for a project. Please do not use the reserve ' + - 'word "React".', + '"%s" is not a valid name for a project. Please do not use the ' + + 'reserved word "React".', name ); process.exit(1);