I use browserify as i wanted to transition toward a more modular code
arrangement, and it is really nice being able to use npm modules too.

After looking at ways to concat angular module files first (or use
something like gulp-angular-filesort) i think that i would actually just
concat and use angular for all dependancies in the future. I might even
refactor out browserify. One thing that is nice, is that you can also have
non-angular modules (obviously), in our case build a core sdk that the
angular app uses. This is all required in nicely. I think it would be best
tho to separate the projects (sdk and app) and have one use browerify, and
the other angular (concat). So, in the case of angular with browserify, im
not sold on its benefits. It also means that the angular module definitions
(index.js) that define things like .factory('something',
require('./something.js'), hold the 'name' that a service is injected as,
but the definition is in a different file, which isnt so great for
encapsulation.

Id be thinking that you could use es6 modules over browserify if you are
using traceur anyways? That seems more fitting?

Anyway, my plan is to keep angular 1.x as es5 and then embrace change as it
happens.




On 19 November 2014 08:28, Eric Eslinger <eric.eslin...@gmail.com> wrote:

> In order to build code that I think will make the 2.0 transition more
> smooth, I've been working on integrating traceur and ES6 stuff into my
> angular development. I've also split a fair bit of stuff into plain-old
> classes, treating my directive definitions and routing definitions as
> pretty much just act as a harness to wire angular into the relevant objects.
>
> I'm not using browserify at all in this workflow. I'm not sure it's
> needed; angular already has its own way to handle dependencies and stuff.
> I'm not sure how I would handle using require() style code inside angular's
> DI space.
>
> Has anyone in the list used Browserify with angular, in particular with
> es6ify / traceur? It seems handy, but I'm interested in figuring out
> whether  it would reduce complexity or add complexity to the app structure.
>
> e
>
> PS: for the record, what I *am* doing is using gulp to pipe everything
> into traceur or coffee based on the file extension, then catting everything
> together, and minifying. The gulp-angular-filesort plugin is really helpful
> here, as it makes sure that the files in your stream are in the correct
> order to avoid module instantiation errors.
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Tony Polinelli

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to