Skip to content
Extraits de code Groupes Projets
Valider b6648cb9 rédigé par Alec Leamas's avatar Alec Leamas
Parcourir les fichiers

Handle jammit by precaching in script/server.

This introduces some jammit warnings in 'rake spec'. These seem
to be just warnings. To get rid of them, take steps as described in
https://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora
in the "Read-only Installation" (sic!) chapter.
parent 194373ff
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
package: always
javascripts:
flash_socket:
- public/javascripts/vendor/FABridge.js
......@@ -19,14 +20,14 @@ javascripts:
- public/javascripts/vendor/mailchimp/jquery.form.js
- public/javascripts/vendor/mailchimp/jquery.validate.js
- public/javascripts/vendor/mailchimp/jquery126.min.js
photo:
- public/javascripts/photo.js
- public/javascripts/image-picker.js
aspects:
- public/javascripts/vendor/jquery-ui-1.8.6.custom.min.js
- public/javascripts/aspect-edit.js
stylesheets:
default:
- public/stylesheets/application.css
......
......@@ -48,6 +48,16 @@ if [ ! -e public/source.tar.gz ]; then
exit 65
fi
# Precache jammit assets
if [ -w public ]; then
bundle exec jammit
fi
if [ ! -e 'public/assets/main.js.gz' ]; then
echo 'Jammit precache error (now or at install)' >&2
exit 66
fi
mkdir -p -v log/thin/
bundle exec ruby ./script/websocket_server.rb&
bundle exec magent start --log-path=log/ &
......
......@@ -41,20 +41,8 @@ def process_message
end
end
def package_js
require 'jammit'
begin
Jammit.package!
rescue => e
puts "Error minifying assets, but server will continue starting normally."
puts e.inspect
end
end
begin
EM.run {
package_js
Diaspora::WebSocket.initialize_channels
socket_params = { :host => APP_CONFIG[:socket_host],
......
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