List Bower commands alphabetically in help

This commit is contained in:
Nicolas Gallagher
2013-03-10 16:14:25 -07:00
parent d2413f03d9
commit 986bea25a6

View File

@@ -29,7 +29,10 @@ module.exports = function (name) {
var validCommand = !!(name && commands[name]);
var templateName = validCommand ? 'help-' + name : 'help';
if (!validCommand) context = { commands: Object.keys(commands).join(', ') };
if (!validCommand) context = {
commands: Object.keys(commands).sort().join(', ')
}
_.extend(context, config);
template(templateName, context)