Permalink
Browse files

minor refactoring

  • Loading branch information...
1 parent de7f328 commit 9b006423358d9793529cfcf6e9c1acb23fcc6866 @Grigore147 committed Feb 5, 2013
Showing with 30 additions and 42 deletions.
  1. +30 −42 lib/katana.js
View
@@ -133,52 +133,40 @@ Class('Katana', {
boot: function() {
Async.series({
config: function(callback) {
- App.series('boot.config', function(error, results) {
- callback(error, results);
- });
- },
- stores: function(callback) {
- App.series('boot.stores', function(error, results) {
- callback(error, results);
- });
- },
- models: function(callback) {
- Model.load(null, function() {
- App.series('boot.models', function(error, results) {
- callback(error, results);
- });
- });
- },
- views: function(callback) {
- View.load(null, function() {
- App.series('boot.views', function(error, results) {
- callback(error, results);
- });
- });
- },
- modules: function(callback) {
- App.series('boot.modules', function(error, results) {
- callback(error, results);
- });
- },
- controllers: function(callback) {
- load(root + 'application/controllers', function(error, controllers) {
- App.controllers = controllers;
+ App.series('boot.config', callback);
+ },
+ stores: function(callback) {
+ App.series('boot.stores', callback);
+ },
+ models: function(callback) {
+ Model.load(null, function() {
+ App.series('boot.models', callback);
+ });
+ },
+ views: function(callback) {
+ View.load(null, function() {
+ App.series('boot.views', callback);
+ });
+ },
+ modules: function(callback) {
+ App.series('boot.modules', callback);
+ },
+ controllers: function(callback) {
+ load(root + 'application/controllers', function(error, controllers) {
+ App.controllers = controllers;
- App.series('boot.controllers', function(error, results) {
- callback(error, results);
- });
- });
- }
+ App.series('boot.controllers', callback);
+ });
+ }
},
function(error, results) {
- if (error) {
- throw error;
- } else {
- App.run();
- }
+ if (error) {
+ throw error;
+ } else {
+ App.run();
+ }
});
- }
+ }
}
});

0 comments on commit 9b00642

Please sign in to comment.