Skip to content

Commit 1677936

Browse files
committed
Asset pipeline support, small theme change required [THEME] [DEPLOY]
It should now be possible to develop themes which take advantage of the asset pipeline for non-view resources such as stylesheets using SASS/SCSS or javascript using CoffeeScript (add to :assets group in Gemfile). [THEME] If you are maintaining a theme or fork of calagator, you will need to make a small change to your templates, due to incompatibilities between the asset pipeline and the ':cache => true' attribute. 1. Change following line in themes/*/views/layouts/application.html.erb: <%= javascript_include_tag :defaults, :cache => true %> to look like: <%= javascript_include_tag 'application' %> 2. Remove any additional ':cache => true' attributes used in your theme; most likely you won't find any beyond #1 above. [DEPLOY] Deploying calagator now requires you to precompile assets using: $> rake assets:precompile Conflicts: config/environments/development.rb
1 parent c93288a commit 1677936

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+66
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ db/*.sqlite3.*
2727
index/*
2828
log/*
2929
nbproject/*
30+
public/assets
3031
public/images/active_scaffold
3132
public/images/record_select
3233
public/javascripts/active_scaffold

Gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,21 @@ group :development, :test do
157157
gem 'pry'
158158
end
159159

160+
# Gems used only for assets and not required
161+
# in production environments by default.
162+
group :assets do
163+
# gem 'sass-rails', '~> 3.2.3'
164+
# gem 'coffee-rails', '~> 3.2.1'
165+
166+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
167+
# gem 'therubyracer', :platforms => :ruby
168+
169+
# Minify assets. Requires a javascript runtime, such as 'therubyracer'
170+
# above. You will also need to set 'config.assets.compress' to true in
171+
# config/environments/production.rb
172+
# gem 'uglifier', '>= 1.0.3'
173+
end
174+
160175
# Some dependencies are activated through server settings.
161176
require "#{basedir}/lib/secrets_reader"
162177
secrets = SecretsReader.read(:silent => true)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)