app/assets/javascripts/eastwood.js.coffee.erb in eastwood-0.3.2 vs app/assets/javascripts/eastwood.js.coffee.erb in eastwood-0.3.5

- old
+ new

@@ -2,22 +2,25 @@ * eastwood.js - <%= app %> ### app = { env : "<%= env %>", routes : { } } ###* - * Routes + * Exports ### -<% routes.each do |key, route| %> -app.routes.<%= route.coffee_name %> = ( <%= route.coffee_args %> ) -> - "<%= route.coffee_path %>" +app.exports = +<% exports.each do |key, value| %> + <%= key.to_s %> : <%= value.is_a?( String ) ? "'#{value}'" : value %> <% end %> ###* - * Hashes + * Routes ### +app.routes = +<% routes.each do |key, route| %> + <%= route.coffee_name %> : ( <%= route.coffee_args %> ) -> "<%= route.coffee_path %>" +<% end %> <% hashes.each do |key, route| %> -app.routes.<%= route.coffee_name %> = ( <%= route.coffee_args %> ) -> - "<%= route.coffee_path %>" + <%= route.coffee_name %> : ( <%= route.coffee_args %> ) -> "<%= route.coffee_path %>" <% end %> ###* * Export ###