Class: JsDuck::Options::InputFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/jsduck/options/input_files.rb

Overview

Finalizes the list of input files.

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ InputFiles

Returns a new instance of InputFiles.



9
10
11
# File 'lib/jsduck/options/input_files.rb', line 9

def initialize(opts)
  @opts = opts
end

Instance Method Details

#expand!Object

Expands opts.input_files (modifying its contents):

  • When file is a directory, scans all JS, SCSS files in there.

  • When file is a .jsb3 file, extracts list of files from it.

  • Otherwise returns array with this same input filename.

Then excludes the files and dirs listed in opts.exclude.



20
21
22
23
# File 'lib/jsduck/options/input_files.rb', line 20

def expand!
  @opts.input_files = expand_files(@opts.input_files)
  exclude_files!(@opts.input_files, @opts.exclude)
end