mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
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
This commit is contained in:
parent
4673dca0b0
commit
90f15940fa
9
react-native-cli/index.js
vendored
9
react-native-cli/index.js
vendored
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user