title: How do i split my Ember CLI addon into a vanilla Ember library and an Ember CLI addon wrapper?
body: <p>I've created my first Ember CLI addon by following the instructions from the Ember CLI homepage. The addon works fine and it already has a couple of stars on Github: <a href="https://github.com/lolmaus/ember-cli-stained-by-children" rel="nofollow">https://github.com/lolmaus/ember-cli-stained-by-children</a></p>
  
  <p>The problem is that it's impossible to use the addon without Ember CLI, for example, on <a href="http://emberjs.jsbin.com/" rel="nofollow">http://emberjs.jsbin.com/</a> .</p>
  
  <p>I've seen other addons that don't have such a limitation: the library is implemented as a Bower package that can be used with or without Ember CLI, and also an Ember CLI addon wrapper is provided.</p>
  
  <p>An example of such an addon is Simple Auth.</p>
  
  <p>It has three repositories:</p>
  
  <ul>
  <li>Main source code: <a href="https://github.com/simplabs/ember-simple-auth" rel="nofollow">ember-simple-auth</a>.</li>
  <li>Precompiled bower package: <a href="https://github.com/simplabs/ember-simple-auth-component" rel="nofollow">ember-simple-auth-component</a>.</li>
  <li>Ember CLI wrapper: <a href="https://github.com/simplabs/ember-cli-simple-auth" rel="nofollow">ember-cli-simple-auth</a>.</li>
  </ul>
  
  <p>But it's hard to take example from those because Simple Auth is a huge library.</p>
  
  <p><strong>The questions are:</strong></p>
  
  <ol>
  <li>How do i organize the main source code so that i can build different library types from it (global and Ember CLI-friendly AMD)?</li>
  <li>How do i organize the Ember CLI wrapper code? What should i do in it in order to leverage the library?</li>
  <li>How do i automate releases?</li>
  </ol>