nimbly/angular-formly — pull request #72 by kentcdodds (2014-08-21 15:24:05+00:00)
Title: Moved a whole bunch of things around and changed the build.

We now have templateless builds. Getting ready to add tests.

What do you think of this @astrism? Feel free to pull and play around. But here are the major changes (I should have added them to the changelog):

- Moved all demo-only related files to a demo folder and added a symbolic link to src so when it's deployed the src goes with it.
- Separated out the src folder into three sub folders: `common`, `bootstrap`, and `vanilla`. The build takes `bootstrap` and `vanilla` and builds them separately. They each build with `common`. There is also a separate file for setting up the default template mapping with their types and this is excluded for the `no-templates` build. The final output is: `formly.js`, `formly.bootstrap.js`, and `formly.vanilla.js`. Adding other styles will be very easy.

I also made it very simple for us to add directive templates as needed. Simply add a `formly-field-buttongroup.js` and `formly-field-buttongroup.html` and the build should pick those up. All templates should be referenced by simply: `fields/formly-field-buttongroup.html` (for example). Unfortunately this means that when using the non-built version of formly you have to add items to the `$templateCache` yourself, but people shouldn't be doing that anyway so I have no problem discouraging this. In the demo I don't have a problem doing this either as we were required to explicitly define the template urls for the types anyway.

I decided to leave the test stuff out of this. I'm going to wait until this gets merged before I work on that. Also, I've named this branch 0.1.0 because creating the no-templates build is a breaking change (as the vanilla build now exists in the `formly.vanilla.js` file). I believe it's time to start considering what improvements to the api we could make while we have the liberty of making breaking changes. We can keep track of the upgrade path and I don't believe it will be painful for most people.

Let me know what you think.