mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 00:23:26 +00:00
Fix react-native-cli code formatting
This commit is contained in:
parent
f2b76566f3
commit
214ae2062c
32
react-native-cli/index.js
vendored
32
react-native-cli/index.js
vendored
@ -78,24 +78,24 @@ function init(name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createAfterConfirmation(name) {
|
function createAfterConfirmation(name) {
|
||||||
prompt.start();
|
prompt.start();
|
||||||
|
|
||||||
var property = {
|
var property = {
|
||||||
name: 'yesno',
|
name: 'yesno',
|
||||||
message: 'Directory ' + name + ' already exist. Continue?',
|
message: 'Directory ' + name + ' already exist. Continue?',
|
||||||
validator: /y[es]*|n[o]?/,
|
validator: /y[es]*|n[o]?/,
|
||||||
warning: 'Must respond yes or no',
|
warning: 'Must respond yes or no',
|
||||||
default: 'no'
|
default: 'no'
|
||||||
};
|
};
|
||||||
|
|
||||||
prompt.get(property, function (err, result) {
|
prompt.get(property, function (err, result) {
|
||||||
if (result.yesno[0] === 'y') {
|
if (result.yesno[0] === 'y') {
|
||||||
createProject(name);
|
createProject(name);
|
||||||
} else {
|
} else {
|
||||||
console.log('Project initialization canceled');
|
console.log('Project initialization canceled');
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function createProject(name) {
|
function createProject(name) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user