Sha256: 2bfff19c9ac0e5d7367b08276bf3d8f0da89f57512d002e5ff96652d1f884684

Contents?: true

Size: 992 Bytes

Versions: 3

Compression:

Stored size: 992 Bytes

Contents

#!/usr/bin/env ruby

require "style_stats"
require 'optparse'

options = {}
opt = OptionParser.new
opt.banner = 'Usage: style_stats [options] <file ...>'

opt.on('-h', '--help', 'output usage information') do
  puts opt
  exit
end

opt.on('-V', '--version', 'output the version number') do |v|
  puts StyleStats::VERSION
  exit
end


opt.on('-c', '--config <path>', 'set configurations') { |v| options[:config] = v }
opt.on('-f', '--format <format>', 'set the output format <json|html|md>') { |v| options[:format] = v }
opt.on('-t', '--template <path>', 'set the template path for output format') { |v| options[:template] = v }
opt.on('-n', '--number', 'show only numeral metrics') { |v| options[:number] = v }
opt.on('-m', '--mobile [name]', 'set the mobile user agent') { |v| options[:user_agent] = v || 'ios' }
opt.on('--user-anget <string>', 'set the user agent') { |v| options[:user_agent] = v }

opt.parse!(ARGV)

if ARGV.empty?
  puts opt
else
  StyleStats::CLI.run(ARGV, options)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
style_stats-0.4.2 exe/style_stats
style_stats-0.4.1 exe/style_stats
style_stats-0.4.0 exe/style_stats