moves nodejs to the bottom of the runtimes list

This commit is contained in:
Egor Kislitsyn 2016-04-14 12:40:15 +07:00
parent ba649e70e9
commit e222a57128

View File

@ -126,6 +126,14 @@ usage: serverless function create <function>`,
label: name
}));
let nodejsChoice = _.find(choices, {value: 'nodejs'});
if (nodejsChoice) {
choices = _.without(choices, nodejsChoice);
nodejsChoice.label = 'nodejs (v0.10, soon to be deprecated)';
choices.push(nodejsChoice);
}
return this.cliPromptSelect(`Please, select a runtime for this new Function`, choices, false)
.then(values => this.evt.options.runtime = values[0].value);
})