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, = {} [:bundle] = .fetch :bundle, true [:minify] = .fetch :minify, false [:gzip] = .fetch :gzip, false script_processor.content filename, end |