app/assets/javascripts/eastwood.js.coffee.erb in eastwood-0.3.5 vs app/assets/javascripts/eastwood.js.coffee.erb in eastwood-0.3.7
- old
+ new
@@ -4,23 +4,27 @@
app = { env : "<%= env %>", routes : { } }
###*
* Exports
###
+<% if exports.any? %>
app.exports =
<% exports.each do |key, value| %>
<%= key.to_s %> : <%= value.is_a?( String ) ? "'#{value}'" : value %>
<% end %>
+<% end %>
###*
* Routes
###
+<% if routes.any? or hashes.any? %>
app.routes =
<% routes.each do |key, route| %>
<%= route.coffee_name %> : ( <%= route.coffee_args %> ) -> "<%= route.coffee_path %>"
<% end %>
<% hashes.each do |key, route| %>
<%= route.coffee_name %> : ( <%= route.coffee_args %> ) -> "<%= route.coffee_path %>"
+<% end %>
<% end %>
###*
* Export
###