Class: Schnitzelpress::JavascriptPacker

Inherits:
Object
  • Object
show all
Defined in:
lib/schnitzelpress/actions/assets.rb

Class Method Summary collapse

Class Method Details

.pack_javascripts!(files) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/schnitzelpress/actions/assets.rb', line 6

def self.pack_javascripts!(files)
  plain = files.map do |filename|
    File.read(File.expand_path("../lib/assets/js/#{filename}", settings.root))
  end.join("\n")

  Packr.pack(plain)
end