lib/lotus/generators/application/app/config/application.rb.tt in lotusrb-0.5.0 vs lib/lotus/generators/application/app/config/application.rb.tt in lotusrb-0.6.0

- old
+ new

@@ -1,6 +1,7 @@ require 'lotus/helpers' +require 'lotus/assets' module <%= config[:classified_app_name] %> class Application < Lotus::Application configure do ## @@ -111,22 +112,44 @@ templates 'app/templates' ## # ASSETS # + assets do + # JavaScript compressor + # + # Supported engines: + # + # * :builtin + # * :uglifier + # * :yui + # * :closure + # + # See: http://lotusrb.org/guides/assets/compressors + # + # In order to skip JavaScript compression comment the following line + javascript_compressor :builtin - # Specify sources for assets - # The directory `public/` is added by default - # - # assets << [ - # 'vendor/javascripts' - # ] + # Stylesheet compressor + # + # Supported engines: + # + # * :builtin + # * :yui + # * :sass + # + # See: http://lotusrb.org/guides/assets/compressors + # + # In order to skip stylesheet compression comment the following line + stylesheet_compressor :builtin - # Enabling serving assets - # Defaults to false - # - # serve_assets false + # Specify sources for assets + # + sources << [ + 'app/assets' + ] + end ## # SECURITY # @@ -193,40 +216,55 @@ # This is useful for sharing common functionality # # See: http://www.rubydoc.info/gems/lotus-view#Configuration view.prepare do include Lotus::Helpers + include <%= config[:classified_app_name] %>::Assets::Helpers end end ## # DEVELOPMENT # configure :development do # Don't handle exceptions, render the stack trace handle_exceptions false - - # Serve static assets during development - serve_assets true end ## # TEST # configure :test do # Don't handle exceptions, render the stack trace handle_exceptions false - - # Serve static assets during development - serve_assets true end ## # PRODUCTION # configure :production do # scheme 'https' # host 'example.org' # port 443 + + assets do + # Don't compile static assets in production mode (eg. Sass, ES6) + # + # See: http://www.rubydoc.info/gems/lotus-assets#Configuration + compile false + + # Use digest file name for asset paths + # + # See: http://lotusrb.org/guides/assets/digest + digest true + + # Content Delivery Network (CDN) + # + # See: http://lotusrb.org/guides/assets/content-delivery-network + # + # scheme 'https' + # host 'cdn.example.org' + # port 443 + end end end end