Hi Eric,

We're using browserify with a mix of angular and commonjs/AMD modules as
well as a handful of things that need to run outside of a module system
(es5-shim, raven, modernizr).  We don't do any transpiling, yet.

Currently we are using browserify on things like angular, but only because
we produce sourcemaps for everything and it's easier to process vendor
dependencies this way than to try to fixup all the different variations on
sourcemaps that vendors provide.

The prospect of using commonjs modules and angular modules together was
weird at first, but the line has actually become fairly clear.  We write a
lot javascript that doesn't do anything related to the browser.  Once we
had a working build system there wasn't any reason not write these as
commonjs.  We haven't changed our regular angular code other than to allow
use of require() to pull in commonjs modules.

I can go into more detail about how we use browserify, but as we aren't
doing any transpiling I'm not sure I would be answering your questions.  I
spent a good bit of time researching various module loaders and bundling
tools before deciding browserify was the best (least terrible) option.  At
the time ES6 modules seemed like they held the most promise for the future.


Kai





On Wed, Nov 19, 2014 at 11:28 AM, Eric Eslinger <[email protected]>
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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to