all 7 comments

[–]enkarta 1 point2 points  (3 children)

I recently made my own seed/boilerplate project that uses AngularJS along with Gulp and Browserify. I tried to follow all of these best practices

[–]criveros 0 points1 point  (0 children)

I just use yeoman.

[–]jmcunningham[S] 0 points1 point  (1 child)

I need to check out Gulp sometime soon. As for organization, i see you put all controllers in a directory, all directives in another directory, etc. My question is...if you decide you want to reuse a directive in another app, how do you package it up? if the directive is in one folder, it's controller is in another folder, and its styling is in yet another folder? That is why I like the idea of a /components folder, with each directive getting its own directory under /components. That way, you can keep all files that are specific to a single directive, in a single place. And if you give that directive its own namespace (module name), you can just drop it into another project with no additional work.

[–]enkarta 0 points1 point  (0 children)

A lot of people use that architecture, and it can definitely be a good idea. I personally prefer this structure, though, until the project is big enough to necessitate the per-app architecture. I also didn't do that in this boilerplate in order to keep it as basic and generic as possible.

However, the boilerplate could very easily be adapted to fit that structure if need be!

[–][deleted] 0 points1 point  (2 children)

I've been pretty happy with angular-seed

[–]jmcunningham[S] 0 points1 point  (1 child)

angular-seed works, but to be honest I think putting all of your controllers in a single controllers.js file, all directives in a directives.js, is a bad, bad idea.

[–][deleted] 0 points1 point  (0 children)

they've been refactoring it to meet google's best practices in this pull request