Method: WebAssets::Api#script_content

Defined in:
lib/web_assets/api.rb

#script_content(filename, options = {}) ⇒ Object

return the script content as a string boolean options:

- bundle: inline all dependencies
- minify: minify the content
- gzip:   return the gzipped binary content


61
62
63
64
65
66
# File 'lib/web_assets/api.rb', line 61

def script_content filename, options = {}
  options[:bundle] = options.fetch :bundle, true
  options[:minify] = options.fetch :minify, false
  options[:gzip]   = options.fetch :gzip, false
  script_processor.content filename, options
end