mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-26 05:49:54 +00:00
Print verbose help in resin help command
This commit is contained in:
parent
11354de596
commit
78ab2af8ba
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var _, capitano, columnify, command, general, indent, parse, print;
|
var _, capitano, columnify, command, general, indent, messages, parse, print;
|
||||||
|
|
||||||
_ = require('lodash');
|
_ = require('lodash');
|
||||||
|
|
||||||
@ -26,6 +26,8 @@ limitations under the License.
|
|||||||
|
|
||||||
columnify = require('columnify');
|
columnify = require('columnify');
|
||||||
|
|
||||||
|
messages = require('../utils/messages');
|
||||||
|
|
||||||
parse = function(object) {
|
parse = function(object) {
|
||||||
return _.object(_.map(object, function(item) {
|
return _.object(_.map(object, function(item) {
|
||||||
var signature;
|
var signature;
|
||||||
@ -55,7 +57,9 @@ limitations under the License.
|
|||||||
general = function(params, options, done) {
|
general = function(params, options, done) {
|
||||||
var commands, groupedCommands;
|
var commands, groupedCommands;
|
||||||
console.log('Usage: resin [COMMAND] [OPTIONS]\n');
|
console.log('Usage: resin [COMMAND] [OPTIONS]\n');
|
||||||
console.log('Primary commands:\n');
|
console.log(messages.gettingStarted + "\n");
|
||||||
|
console.log(messages.reachingOut);
|
||||||
|
console.log('\nPrimary commands:\n');
|
||||||
commands = _.reject(capitano.state.commands, function(command) {
|
commands = _.reject(capitano.state.commands, function(command) {
|
||||||
return command.isWildcard();
|
return command.isWildcard();
|
||||||
});
|
});
|
||||||
|
6
build/utils/messages.js
Normal file
6
build/utils/messages.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
(function() {
|
||||||
|
exports.gettingStarted = 'Run the following command to get a device started with Resin.io\n\n $ resin quickstart';
|
||||||
|
|
||||||
|
exports.reachingOut = 'If you need help, or just want to say hi, don\'t hesitate in reaching out at:\n\n GitHub: https://github.com/resin-io/resin-cli/issues/new\n Gitter: https://gitter.im/resin-io/chat';
|
||||||
|
|
||||||
|
}).call(this);
|
@ -18,6 +18,7 @@ _ = require('lodash')
|
|||||||
_.str = require('underscore.string')
|
_.str = require('underscore.string')
|
||||||
capitano = require('capitano')
|
capitano = require('capitano')
|
||||||
columnify = require('columnify')
|
columnify = require('columnify')
|
||||||
|
messages = require('../utils/messages')
|
||||||
|
|
||||||
parse = (object) ->
|
parse = (object) ->
|
||||||
return _.object _.map object, (item) ->
|
return _.object _.map object, (item) ->
|
||||||
@ -46,7 +47,9 @@ print = (data) ->
|
|||||||
|
|
||||||
general = (params, options, done) ->
|
general = (params, options, done) ->
|
||||||
console.log('Usage: resin [COMMAND] [OPTIONS]\n')
|
console.log('Usage: resin [COMMAND] [OPTIONS]\n')
|
||||||
console.log('Primary commands:\n')
|
console.log("#{messages.gettingStarted}\n")
|
||||||
|
console.log(messages.reachingOut)
|
||||||
|
console.log('\nPrimary commands:\n')
|
||||||
|
|
||||||
# We do not want the wildcard command
|
# We do not want the wildcard command
|
||||||
# to be printed in the help screen.
|
# to be printed in the help screen.
|
||||||
|
12
lib/utils/messages.coffee
Normal file
12
lib/utils/messages.coffee
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
exports.gettingStarted = '''
|
||||||
|
Run the following command to get a device started with Resin.io
|
||||||
|
|
||||||
|
$ resin quickstart
|
||||||
|
'''
|
||||||
|
|
||||||
|
exports.reachingOut = '''
|
||||||
|
If you need help, or just want to say hi, don't hesitate in reaching out at:
|
||||||
|
|
||||||
|
GitHub: https://github.com/resin-io/resin-cli/issues/new
|
||||||
|
Gitter: https://gitter.im/resin-io/chat
|
||||||
|
'''
|
Loading…
x
Reference in New Issue
Block a user