title: How to organize my own angular 1.x modules in my project (I'm using typescript)?
body: <p>I'm writing an angular app for which I need to create a few angular modules (read services and directives). The thing is I want them to be <strong><em>re-usable</em></strong> and hopefully installable in my other projects using <code>bower</code>. </p>
  
  <p><em>Example:</em> Let's say I'm creating these two directives for my angular project (with PHP as backend). This is only for example, I'll be creating many such modules actually.</p>
  
  <ol>
  <li>Angular image enhancer (angular-image-enhancer <em>directive</em>)</li>
  <li>Angular session manager (angular-sesion-mananger <em>service</em>)</li>
  </ol>
  
  <p>The structure of my app is something like this</p>
  
  <p><code> app
     model
     view
     controller
       Homepage.php
   public
     static
        bower_components
          angular
            angular.js
          jquery
   vendor
     composer
     symfony
     monolog
     (other php modules)
  </code></p>
  
  <p><strong>Question #1:</strong> In which directory should I store the AngularJs modules I'm creating? Should I create <code>angular-image-enhancer</code> directory under <code>public &gt; static &gt; bower_components</code>?</p>
  
  <p><strong>Question #2:</strong> I want these modules that I'm creating to be imported in my other projects using <code>bower</code> like <code>bower install angular-image-enhancer</code> (i.e. use bower to install them during project deployment also)</p>
  
  <p><strong>Question #3:</strong> I'm using Typescript to write my angular modules. How can I make it so that I can have <code>src</code> and <code>dist</code> folders with my <code>.ts</code> files in the <code>angular-image-enhancer &gt; src</code> folder and compiled js files <strong><em>automatically</em></strong> put in the <code>angular-image-enhancer &gt; dist</code> folder respectively?</p>
  
  <p>P.S. I'm using <code>PhpStorm</code> in case that matters to anyone.</p>
  
  <p>Thanks for the help!</p>