Method: Jets::Builders::Tidy#jetskeep

Defined in:
lib/jets/builders/tidy.rb

#jetskeepObject

We clean out ignored files pretty aggressively. So provide a way for users to keep files from being cleaned out.



41
42
43
44
45
46
47
48
49
# File 'lib/jets/builders/tidy.rb', line 41

def jetskeep
  defaults = %w[.bundle pack handlers public/assets]
  path = "#{@project_root}/.jetskeep"
  return defaults unless File.exist?(path)

  keep = IO.readlines(path)
  keep = keep.map {|i| i.strip}.reject { |i| i =~ /^#/ || i.empty? }
  (defaults + keep).uniq
end