Sha256: c7f74a720d6a4864b5fdae180a09e16fb317cb99e09142cc958519f34d39c7f9

Contents?: true

Size: 603 Bytes

Versions: 73

Compression:

Stored size: 603 Bytes

Contents

# frozen_string_literal: true

require 'avm/executables'
require 'avm/files/formatter/formats/generic_plain'

module Avm
  module Files
    class Formatter
      module Formats
        class Javascript < ::Avm::Files::Formatter::Formats::GenericPlain
          VALID_BASENAMES = %w[*.js].freeze
          VALID_TYPES = [].freeze

          def internal_apply(files)
            ::Avm::Executables.js_beautify.command.append(
              ['--indent-size=2', '--end-with-newline', '--replace', *files]
            ).system!
            super(files)
          end
        end
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 4 rubygems

Version Path
eac_tools-0.37.1 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.37.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.36.1 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.36.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.35.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.34.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.33.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.32.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.31.1 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
avm-files-0.4.1 lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.31.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.30.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
avm-tools-0.129.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.16.0 sub/avm-tools/sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
avm-tools-0.128.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.15.0 sub/avm-tools/sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.14.0 sub/avm-tools/sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.13.0 sub/avm-tools/sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
avm-tools-0.127.0 sub/avm-files/lib/avm/files/formatter/formats/javascript.rb
eac_tools-0.12.0 sub/avm-tools/sub/avm-files/lib/avm/files/formatter/formats/javascript.rb