UPDATE: just came across a better solution from kamsar, that generates code, serialization and tests for the module. Please use that one instead of described below, however, the principle described below is exactly the same so you may refer for the sake of understanding.
---------------------------- original text below ----------------------------
I have found a great solution that makes adding a new project into existing Helix / Habitat solution so transparent and painless - Prodigious Helix Generator.
The guidance is well done and describes all thee steps. Is is soooo easy, and removes pain of fixing some forgotten references / namespaces / etc after you accidentally found out. It also optionally creates TDS project skeleton for your module, once you need to serialise items (why not to add Unicorn in addition to?).
So, to make it work you need to install yeoman first and afterwards the generator tool itself:
npm install -g yo
npm install -g generator-prodigious-helix
One important thing to mention is that not to mess with the paths and to get new module generated under the right path - run it at the root of your solution / repo.
You are at a choice of 3 options. In order to add a foundation, type in:
to make a feature:
and for project even simpler:
As for example, below I am creating a new foundation module called AdminTools for the solution named HelixSolution. That will result in creating me a project called HelixSolution.Foundation.AdminTools within a same name folder (created) at the right path under Foundation folder. All the namespaces, references, settings and naming conventions would be auto-generated and correct!
After answering those 3 questions, you'll get your stuff generated:
The only thing I noticed it that it appends solution name under App_config folder: App_Config\Include\HelixSolution\Feature\Feature.AdminTools.config so depending on your setup you may need to move Feature\Feature.AdminTools.config one level up into Include folder.
Hope it will start saving your time as much as it saves mine.