Skip to content
Extraits de code Groupes Projets
Valider 1aa0b15c rédigé par Steven Hancock's avatar Steven Hancock Validation de Maxwell Salzberg
Parcourir les fichiers

Move Javascript to the asset pipeline

* Move all Diaspora-specific javascripts to app/assets/javascripts
* Move all vendored javascripts to vendor/assets/javascripts
* Add the appropriate Sprockets require directives to make sure
  everything gets included in the right order
* Remove Jammit dependencies
* Fix all templates that were using Jammit's include_javascripts helper
* Add handlebars_assets gem for compiling Handlebars templates
* Move all Handlebars templates to app/assets/templates and rename
  from .handlebars to .jst.hbs (this is to keep them in the same
  global JST namespace that they were in under Jammit)
* Add public/assets to .gitignore since these files can and should
  be re-generated by Heroku or Capistrano during each deploy
* Fix a few Handlebars templates that were looking for images in the
  wrong location (I'm sure there are others, but it's late)
* Configure application.rb to precompile all javascript and css assets
  that were compiled by Jammit in the Rails 3.0 code
parent 9dffb426
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 18 ajouts et 20 suppressions
...@@ -66,3 +66,7 @@ dump.rdb ...@@ -66,3 +66,7 @@ dump.rdb
#Rubinius's JIT #Rubinius's JIT
*.rbc *.rbc
# Ignore precompiled assets
# Heroku or Capistrano can and should regenerate them on every deploy
public/assets
...@@ -64,8 +64,6 @@ gem 'fastercsv', '1.5.4', :require => false ...@@ -64,8 +64,6 @@ gem 'fastercsv', '1.5.4', :require => false
gem 'mini_magick', '3.4' gem 'mini_magick', '3.4'
gem 'rest-client', '1.6.7' gem 'rest-client', '1.6.7'
gem 'jammit-s3'
# JSON and API # JSON and API
gem 'json' gem 'json'
...@@ -113,6 +111,7 @@ group :assets do ...@@ -113,6 +111,7 @@ group :assets do
gem 'sass-rails' gem 'sass-rails'
gem 'uglifier' gem 'uglifier'
end end
gem 'handlebars_assets'
gem 'jquery-rails' gem 'jquery-rails'
......
...@@ -37,10 +37,6 @@ GIT ...@@ -37,10 +37,6 @@ GIT
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
POpen4 (0.1.4)
Platform (>= 0.4.0)
open4
Platform (0.4.0)
SystemTimer (1.2.3) SystemTimer (1.2.3)
actionmailer (3.1.4) actionmailer (3.1.4)
actionpack (= 3.1.4) actionpack (= 3.1.4)
...@@ -188,6 +184,10 @@ GEM ...@@ -188,6 +184,10 @@ GEM
gherkin (2.9.1) gherkin (2.9.1)
json (>= 1.4.6) json (>= 1.4.6)
haml (3.1.4) haml (3.1.4)
handlebars_assets (0.4.1)
execjs (>= 1.2.9)
sprockets (>= 2.0.3)
tilt
hashie (1.2.0) hashie (1.2.0)
heroku (2.23.0) heroku (2.23.0)
launchy (>= 0.3.2) launchy (>= 0.3.2)
...@@ -209,12 +209,6 @@ GEM ...@@ -209,12 +209,6 @@ GEM
actionpack (~> 3.0) actionpack (~> 3.0)
i18n-inflector (~> 2.6) i18n-inflector (~> 2.6)
railties (~> 3.0) railties (~> 3.0)
jammit (0.6.5)
yui-compressor (>= 0.9.3)
jammit-s3 (0.6.0.2)
jammit (>= 0.5.4)
mimemagic (>= 0.1.7)
s3 (>= 0.3.7)
jasmine (1.1.2) jasmine (1.1.2)
jasmine-core (>= 1.1.0) jasmine-core (>= 1.1.0)
rack (>= 1.1) rack (>= 1.1)
...@@ -245,7 +239,6 @@ GEM ...@@ -245,7 +239,6 @@ GEM
treetop (~> 1.4.8) treetop (~> 1.4.8)
messagebus_ruby_api (1.0.3) messagebus_ruby_api (1.0.3)
mime-types (1.18) mime-types (1.18)
mimemagic (0.1.8)
mini_magick (3.4) mini_magick (3.4)
subexec (~> 0.2.1) subexec (~> 0.2.1)
mobile-fu (1.0.0) mobile-fu (1.0.0)
...@@ -295,14 +288,12 @@ GEM ...@@ -295,14 +288,12 @@ GEM
omniauth-oauth (~> 1.0) omniauth-oauth (~> 1.0)
omniauth-twitter (0.0.8) omniauth-twitter (0.0.8)
omniauth-oauth (~> 1.0) omniauth-oauth (~> 1.0)
open4 (1.3.0)
orm_adapter (0.0.6) orm_adapter (0.0.6)
parallel (0.5.16) parallel (0.5.16)
parallel_tests (0.7.2) parallel_tests (0.7.2)
parallel parallel
pg (0.13.2) pg (0.13.2)
polyglot (0.3.3) polyglot (0.3.3)
proxies (0.2.1)
rack (1.3.6) rack (1.3.6)
rack-cache (1.2) rack-cache (1.2)
rack (>= 0.4) rack (>= 0.4)
...@@ -396,8 +387,6 @@ GEM ...@@ -396,8 +387,6 @@ GEM
ruby_core_source (0.1.5) ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2) archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.6.1) rubyzip (0.9.6.1)
s3 (0.3.11)
proxies (~> 0.2.0)
sass (3.1.15) sass (3.1.15)
sass-rails (3.1.6) sass-rails (3.1.6)
actionpack (~> 3.1.0) actionpack (~> 3.1.0)
...@@ -460,8 +449,6 @@ GEM ...@@ -460,8 +449,6 @@ GEM
xpath (0.1.4) xpath (0.1.4)
nokogiri (~> 1.3) nokogiri (~> 1.3)
yard (0.7.5) yard (0.7.5)
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)
PLATFORMS PLATFORMS
ruby ruby
...@@ -497,11 +484,11 @@ DEPENDENCIES ...@@ -497,11 +484,11 @@ DEPENDENCIES
foreman (= 0.34.1) foreman (= 0.34.1)
fuubar (= 0.0.6) fuubar (= 0.0.6)
haml haml
handlebars_assets
heroku heroku
heroku_san heroku_san
http_accept_language (~> 1.0.2) http_accept_language (~> 1.0.2)
i18n-inflector-rails (~> 1.0) i18n-inflector-rails (~> 1.0)
jammit-s3
jasmine (~> 1.1.2) jasmine (~> 1.1.2)
jquery-rails jquery-rails
json json
......
//= require_self
//= require_tree ./helpers
//= require ./router
//= require ./views
//= require_tree ./models
//= require_tree ./pages
//= require_tree ./collections
//= require_tree ./views
var app = { var app = {
collections: {}, collections: {},
models: {}, models: {},
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter