Skip to content

Instantly share code, notes, and snippets.

@sttk
Last active January 7, 2018 12:32
Show Gist options
  • Save sttk/53fcb19e3ba0c6d32fe2606fd11f21e6 to your computer and use it in GitHub Desktop.
Save sttk/53fcb19e3ba0c6d32fe2606fd11f21e6 to your computer and use it in GitHub Desktop.
gulp-cli coloring
{
  colors: {
    helpUsageTitle: 'title'
    helpUsageSyntax: '',
    helpUsageOption: 'option',
    helpUsageTask: 'task',
    helpOptionsTitle: '',
    helpOptionsName: '',
    helpOptionsAlias: '',
    helpOptionsType: 'gray',
    helpOptionsDescription: '',
    
    title: 'bold',
    option: 'cyan',
    task: '',
    
    red: ansiColors.red,
    gray: ansiColors.gray,
    bold: ansiColors.bold,
    
    grinning: () => String.fromCodePoint(0x1f600),
  }
}
var msgs = {
  helpUsage: '{helpUsageTitle: Usage} {helpUsageSyntax: gulp {helpUsageOptions: [options]} {helpUsageTasks: tasks} } {grinning}'
}
log(msg.helpUsage);

log('{helpUsageTitle: Usage} {helpUsageSyntax: gulp {helpUsageOption: [option]} {helpUsageTask: task}');

  • help
    • usage
      • title ('Usage:')
      • syntax ('gulp [options] tasks')
      • option ('[options]')
      • task ('tasks')
    • options
      • title ('Options:')
      • name
      • alias
      • type
      • description
  • require
    • message
    • failed
    • module
  • respawn
    • message
    • pid
    • nodeFlags
  • showVersion
    • message
    • cliVersion
    • gulpVersion
  • verify
    • message
    • packagePath
    • blacklist
      • message
      • failed
      • notfound
      • found
      • plugin
      • reason
  • tasks
    • description
    • task
      • name
      • description
    • option
      • name
      • description
    • child
      • name
      • description
  • running
    • message ('Using gulpfile')
    • gulpfile
    • taskStart
    • taskStop
    • taskError
    • taskNotFound
    • task
    • duration
  • general
    • info ('Working directory changed to')
    • error ('Local gulp not found in', 'No gulp file found', 'Unsupported gulp version')
    • cwd
    • gulpfile
    • path
    • version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment