mainmatter / ember-cli-simple-auth-torii

Ember CLI Addon for the Ember Simple Auth Torii package
https://github.com/simplabs/ember-simple-auth/tree/master/packages/ember-simple-auth-torii
MIT License
7 stars 11 forks source link

Difficulty exporting the ENV variables needed by torii #4

Closed artsyca closed 9 years ago

artsyca commented 9 years ago

I'm setting up torii and it seems that it requires a specific window.ENV variable to exist. In environment.js we are only able to access window.EmberEnv so currently I have an initializer in place that looks like:

toriiEnvInitializer = {
  name: 'toriiEnv',
  before: 'torii',
  initialize: function() {
    window.ENV = window.EmberENV
  }
}

(this is also mentioned in https://github.com/Vestorly/torii/issues/59)

Is there a better way to do this?

marcoow commented 9 years ago

You can actually configure torii via your project's config/environment.js file now and don't need to assign to window.ENVanymore.

artsyca commented 9 years ago

Thank you for the pointer and my apologies. This is indeed working as you describe.