Skip to content

Commit

Permalink
Added an user-defined environment
Browse files Browse the repository at this point in the history
  • Loading branch information
fk1blow committed May 28, 2011
1 parent d1d3a20 commit 447d172
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/Config.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ var Config = Klass({
init: null init: null
}, },


environment: { env: {},
init: null
},


app_paths: function() { app_paths: function() {
return AppPaths.getAllPaths() return AppPaths.getAllPaths()
Expand All @@ -58,7 +56,13 @@ var Config = Klass({
}, },


setEnvironment: function() { setEnvironment: function() {
this.environment = require(this.config_path() + '/environment.js') var env = require(this.config_path() + '/environment.js');

this.env.defaults = {
response: env.default_response || null,
layout: env.default_layout || 'default_layout',
state: env.state || 'development'
}
}, },


getPathFor: function(what) { getPathFor: function(what) {
Expand Down

0 comments on commit 447d172

Please sign in to comment.