title: Conditionally import/instantiate an object from an addon
body: <p>I'd like to make an addon that  </p>
  
  <ol>
  <li>imports config from the host app, then</li>
  <li>inject + instantiates a class based on ENV vars</li>
  </ol>
  
  <p>In particular I'm working with <a href="https://github.com/trek/pretender" rel="nofollow">Pretender</a>, and I want to be able to import the user's config from either their ENV or some object they <code>export</code> under <code>/app</code> in their project.</p>
  
  <p>Then, if the environment is not <code>production</code> and there's no <code>--proxy</code> argument that was passed to the <code>ember serve</code> command, I want my addon to inject and instantiate a Pretender server with the user's config.</p>
  
  <p>Is this possible?</p>