WIP working on serving js in production
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><%= content_for?(:title) ? yield(:title) : (t :name) %></title>
|
<title><%= content_for?(:title) ? yield(:title) : (t :name) %></title>
|
||||||
<%= stylesheet_link_tag "application", "forum-monster" %>
|
<%= stylesheet_link_tag :application %>
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
<%= javascript_include_tag(:application) %>
|
<%= javascript_include_tag :application %>
|
||||||
<%= yield(:head) %>
|
<%= yield(:head) %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ module Community
|
|||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.version = '1.0'
|
config.assets.version = '1.0'
|
||||||
|
|
||||||
config.assets.precompile += ['*.css', '*.js']
|
config.assets.initialize_on_precompile = false
|
||||||
|
|
||||||
|
config.assets.precompile += %w('*.css', '*.js')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,17 +14,24 @@ Community::Application.configure do
|
|||||||
# Compress JavaScripts and CSS
|
# Compress JavaScripts and CSS
|
||||||
config.assets.compress = true
|
config.assets.compress = true
|
||||||
|
|
||||||
|
# Choose the compressors to use
|
||||||
|
config.assets.js_compressor = :uglifier
|
||||||
|
# config.assets.css_compressor = :yui
|
||||||
|
|
||||||
# Don't fallback to assets pipeline if a precompiled asset is missed
|
# Don't fallback to assets pipeline if a precompiled asset is missed
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
|
||||||
# Generate digests for assets URLs
|
# Generate digests for assets URLs
|
||||||
config.assets.digest = true
|
config.assets.digest = true
|
||||||
|
|
||||||
|
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||||
|
# config.assets.precompile += %w( )
|
||||||
|
|
||||||
# Defaults to nil and saved in location specified by config.assets.prefix
|
# Defaults to nil and saved in location specified by config.assets.prefix
|
||||||
# config.assets.manifest = YOUR_PATH
|
# config.assets.manifest = YOUR_PATH
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files
|
# Specifies the header that your server uses for sending files
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
||||||
|
|
||||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||||
|
|||||||
Reference in New Issue
Block a user