Sha256: 009050b9470ee8d21336d247c313205d59cae1cccb4410fb1dbc8e2416ff15fc

Contents?: true

Size: 764 Bytes

Versions: 28

Compression:

Stored size: 764 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.dirname(__FILE__)+"/../lib")

require_relative '../lib/format/bake_format'
require_relative '../lib/format/options/options'

$options = Bake::BakeFormatOptions.new(ARGV)
$options.parse_options()

data =
  if $options.input == '-'
    STDIN.read
  else
    File.read($options.input)
  end

out =
  if $options.output == '-'
    STDOUT
  elsif $options.output == '--'
    out = ($options.input == '-') ? STDOUT : File.open($options.input, 'w')
  else
    File.open($options.output, 'w')
  end

if ($options.start_line != nil) && ($options.end_line != nil)
  bake_format_in_range(data, out, $options.indent, $options.start_line, $options.end_line)
else
  bake_format(data, out, $options.indent)
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
bake-toolkit-2.72.0 bin/bake-format
bake-toolkit-2.71.0 bin/bake-format
bake-toolkit-2.70.1 bin/bake-format
bake-toolkit-2.70.0 bin/bake-format
bake-toolkit-2.69.0 bin/bake-format
bake-toolkit-2.68.1 bin/bake-format
bake-toolkit-2.68.0 bin/bake-format
bake-toolkit-2.67.0 bin/bake-format
bake-toolkit-2.66.0 bin/bake-format
bake-toolkit-2.65.2 bin/bake-format
bake-toolkit-2.65.1 bin/bake-format
bake-toolkit-2.65.0 bin/bake-format
bake-toolkit-2.64.4 bin/bake-format
bake-toolkit-2.64.3 bin/bake-format
bake-toolkit-2.64.2 bin/bake-format
bake-toolkit-2.64.1 bin/bake-format
bake-toolkit-2.64.0 bin/bake-format
bake-toolkit-2.63.2 bin/bake-format
bake-toolkit-2.63.1 bin/bake-format
bake-toolkit-2.63.0 bin/bake-format