Permalink
Browse files

upgrade to latest mimosa/coffeescript

  • Loading branch information...
dbashford committed Mar 27, 2013
1 parent 48bcdad commit 9c2d776665dc3185d17787723c0b2ba9dff8ba5e
Showing with 26 additions and 31 deletions.
  1. +25 −30 assets/javascripts/main.coffee
  2. +1 −1 mimosa-config.coffee
@@ -19,8 +19,7 @@ requirejs.config
'vendor/modernizr':
exports: 'Modernizr'
-requirejs [
- 'app'
+requirejs ['app'
'l18n!nls/hello'
'jquery'
'bootstrap'
@@ -35,35 +34,34 @@ requirejs [
'filters/twitterfy'
'ang'
'responseInterceptors/dispatcher'
- ], (app, hello, $) ->
+], (app, hello, $) ->
$('body').append('Localized hello ==> ' + hello.hello)
-
-
- app.config ['$routeProvider', ($routeProvider) ->
+ rp = ($routeProvider) ->
$routeProvider
- .when '/github/:searchTerm'
- controller: 'gitHub'
- reloadOnSearch: true
- resolve:
- changeTab: ($rootScope) ->
- $rootScope.$broadcast 'changeTab#gitHub'
- .when '/people/details/:id'
- controller: 'personDetails'
- reloadOnSearch: true
- resolve:
- changeTab: ($rootScope) ->
- $rootScope.$broadcast 'changeTab#people'
- .when '/twitter/:searchTerm'
- controller: 'twitter'
- reloadOnSearch: true
- resolve:
- changeTab: ($rootScope) ->
- $rootScope.$broadcast 'changeTab#twitter'
- .otherwise
- redirectTo: '/github/dbashford'
- ]
+ .when '/github/:searchTerm',
+ controller: 'gitHub'
+ reloadOnSearch: true
+ resolve:
+ changeTab: ($rootScope) ->
+ $rootScope.$broadcast 'changeTab#gitHub'
+ .when '/people/details/:id',
+ controller: 'personDetails'
+ reloadOnSearch: true
+ resolve:
+ changeTab: ($rootScope) ->
+ $rootScope.$broadcast 'changeTab#people'
+ .when '/twitter/:searchTerm',
+ controller: 'twitter'
+ reloadOnSearch: true
+ resolve:
+ changeTab: ($rootScope) ->
+ $rootScope.$broadcast 'changeTab#twitter'
+ .otherwise
+ redirectTo: '/github/dbashford'
+
+ app.config ['$routeProvider', rp]
app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
@@ -83,9 +81,6 @@ requirejs [
$rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute
]
-
-
-
#single require statement
###
View
@@ -1,5 +1,5 @@
exports.config =
- minMimosaVersion: "0.8.5"
+ minMimosaVersion: "0.11.1"
modules:['lint','require','server','minify','live-reload','web-package']
minify:
exclude:[/\.min\./, "javascripts/main.js"]

0 comments on commit 9c2d776

Please sign in to comment.