diff --git a/lib/Serverless.js b/lib/Serverless.js index 8311afbae..e1fafef41 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -39,16 +39,7 @@ class Serverless { serverlessPath: __dirname }; - this.setProject( project ); - - // Add Config Settings - this.updateConfig(config); - - // Add Defaults - this.actions = {}; - this.hooks = {}; - this.commands = {}; - this.classes = { + this.classes = { // TODO: add Runtime, Stage, Region State: require('./ServerlessState'), Meta: require('./ServerlessMeta'), @@ -58,6 +49,16 @@ class Serverless { Endpoint: require('./ServerlessEndpoint'), Event: require('./ServerlessEvent') }; + + this.setProject( project ); + + // Add Config Settings + this.updateConfig(config); + + // Add Defaults + this.actions = {}; + this.hooks = {}; + this.commands = {}; this.cli = null; this.state = new this.classes.State(this);