Sha256: 7806f15381798275d0c3b45ee59440cf9ee88887e54b7291c63a45884ca3c2bc

Contents?: true

Size: 1.08 KB

Versions: 53

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

usage 'nanoc command [options] [arguments]'
summary 'Nanoc, a static site compiler written in Ruby'
default_subcommand 'compile'

opt :l, :color, 'enable color' do
  $stdout.remove_stream_cleaner(Nanoc::CLI::StreamCleaners::ANSIColors)
  $stderr.remove_stream_cleaner(Nanoc::CLI::StreamCleaners::ANSIColors)
end

opt :d, :debug, 'enable debugging' do
  Nanoc::CLI.debug = true
end

opt :e, :env, 'set environment', argument: :required do |value|
  ENV.store('NANOC_ENV', value)
end

opt :h, :help, 'show the help message and quit' do |_value, cmd|
  puts cmd.help
  exit 0
end

opt :C, :'no-color', 'disable color' do
  $stdout.add_stream_cleaner(Nanoc::CLI::StreamCleaners::ANSIColors)
  $stderr.add_stream_cleaner(Nanoc::CLI::StreamCleaners::ANSIColors)
end

opt :V, :verbose, 'make output more detailed', multiple: true do |val|
  Nanoc::CLI::Logger.instance.level = :low
  Nanoc::CLI.verbosity = val.size
end

opt :v, :version, 'show version information and quit' do
  puts Nanoc.version_information
  exit 0
end

opt :w, :warn, 'enable warnings' do
  $-w = true
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
nanoc-4.11.12 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.11 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.10 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.9 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.8 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.7 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.6 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.5 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.4 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.3 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.2 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.1 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.11.0 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.10.4 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.10.3 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.10.2 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.10.1 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.10.0 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.9.9 lib/nanoc/cli/commands/nanoc.rb
nanoc-4.9.8 lib/nanoc/cli/commands/nanoc.rb