Module Nanoc::CLI
In: lib/nanoc/cli.rb
lib/nanoc/cli/logger.rb
lib/nanoc/cli/error_handler.rb
lib/nanoc/cli/ansi_string_colorizer.rb
lib/nanoc/cli/command_runner.rb
lib/nanoc/cli/stream_cleaners.rb
lib/nanoc/cli/cleaning_stream.rb

encoding: utf-8

Methods

Classes and Modules

Module Nanoc::CLI::ANSIStringColorizer
Module Nanoc::CLI::Commands
Module Nanoc::CLI::StreamCleaners
Class Nanoc::CLI::CleaningStream
Class Nanoc::CLI::CommandRunner
Class Nanoc::CLI::ErrorHandler
Class Nanoc::CLI::Logger

Constants

Command = CommandRunner   @deprecated Use {Nanoc::CLI::CommandRunner} instead

Public Class methods

Adds the given command to the collection of available commands.

@param [Cri::Command] cmd The command to add

@return [void]

@param [Boolean] boolean true if debug output should be enabled,

  false if it should not

@return [void]

@since 3.2.0

@return [Boolean] true if debug output is enabled, false if not

@since 3.2.0

@return [Cri::Command] The root command, i.e. the commandline tool itself

Invokes the nanoc commandline tool with the given arguments.

@param [Array<String>] args An array of commandline arguments

@return [void]

Protected Class methods

@return [Boolean] true if color support is present, false if not

@return [Boolean] true if UTF-8 support is present, false if not

Loads the command in the file with the given filename.

@param [String] filename The name of the file that contains the command

@return [Cri::Command] The loaded command

Loads site-specific commands in `commands/`.

@return [void]

@return [Array] The directory contents

Makes the commandline interface ready for use.

@return [void]

Wraps `$stdout` and `$stderr` in appropriate cleaning streams.

@return [void]

Sets up the root command and base subcommands.

@return [void]

Wraps the given stream in a cleaning stream. The cleaning streams will have the proper stream cleaners configured.

@param [IO] io The stream to wrap

@return [::Nanoc::CLI::CleaningStream]

[Validate]