Sha256: 56323d7e4088fe180e207ff27887d519f057a09fb089fff0c6aefa95a1c1ed15

Contents?: true

Size: 679 Bytes

Versions: 7

Compression:

Stored size: 679 Bytes

Contents

#!/usr/bin/env ruby
require 'haml_i18n_lint'
require 'optparse'

Version = HamlI18nLint::VERSION

options = HamlI18nLint::Options.new

opt = OptionParser.new
opt.banner = 'Usage: haml-i18n-lint [OPTION]... [FILE]...'
opt.on('-c FILE', '--config=FILE', 'configuration file') do |config_path|
  options.config_path = config_path
end
opt.on('-f PATTERN', '--files=PATTERN', "pattern to find Haml template files, default: -f '**/*.haml'") do |pattern|
  @pattern = pattern
  options.files = [@pattern]
end

opt.parse!(ARGV)

if @pattern
  options.files.concat(ARGV)
elsif !ARGV.empty?
  options.files = ARGV
end

runner = HamlI18nLint::Runner.new(options)
ret = runner.run
exit(ret)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
haml_i18n_lint-0.7.0 exe/haml-i18n-lint
haml_i18n_lint-0.6.0 exe/haml-i18n-lint
haml_i18n_lint-0.5.0 exe/haml-i18n-lint
haml_i18n_lint-0.4.0 exe/haml-i18n-lint
haml_i18n_lint-0.3.0 exe/haml-i18n-lint
haml_i18n_lint-0.2.0 exe/haml-i18n-lint
haml_i18n_lint-0.1.0 exe/haml-i18n-lint