Class: Avm::Files::Formatter::Formats::Javascript

Inherits:
GenericPlain show all
Defined in:
lib/avm/files/formatter/formats/javascript.rb

Constant Summary collapse

VALID_BASENAMES =
%w[*.js].freeze
VALID_TYPES =
[].freeze

Instance Method Summary collapse

Methods inherited from GenericPlain

#file_apply, #string_apply

Methods inherited from Base

#apply, #match?, #name, #valid_basenames, #valid_types

Instance Method Details

#internal_apply(files) ⇒ Object



14
15
16
17
18
19
# File 'lib/avm/files/formatter/formats/javascript.rb', line 14

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