Sha256: 1837e1681fd550ae765a2653489c82864a4e2a0d2b14d764aa14637c8c99aa41

Contents?: true

Size: 980 Bytes

Versions: 23

Compression:

Stored size: 980 Bytes

Contents

# encoding: utf-8

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

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 :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 nanoc output more detailed' do
  Nanoc::CLI::Logger.instance.level = :low
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

run do |opts, args, cmd|
  cmd.command_named('compile').run([])
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
nanoc-3.4.2 lib/nanoc/cli/commands/nanoc.rb
nanoc-3.4.1 lib/nanoc/cli/commands/nanoc.rb
nanoc-3.4.0 lib/nanoc/cli/commands/nanoc.rb