
How Browserify Works - lelf
http://benclinkinbeard.com/posts/how-browserify-works/
======
Polarity
I never use Grunt, Browserify or requirejs. I tried but i found it makes
everything unnecessary complicated. Nowadays i mostly use a node/express
instance and some own modules which concat all my js/coffee files + bower
libraries into one on the fly.

~~~
AgentME
Browserify can be as easy as

    
    
        browserify entry.js > bundle.js
    

That's simpler than any decent concat build process I've seen that needed to
be able to concat source files from multiple folders and control the order.
Browserify gives you a full NPM-compatible CommonJS setup for less effort.

(If you want to do stuff with source maps, minification, or automatic
rebuilds, there may be a few more steps involved, but they're the same or even
simpler steps as you would have to do those same things in a concat setup.)

~~~
Polarity
yea i know but practically it looks different for me.

1.) with tools like browserify i have to look at the folder structure. if i
move things around i have to change some paths inside my codebase. or i have
to change a map config. with my approach i need two paths. the path to my
bower package.json to include all my bower packages and the path to my
codebase with two fixed js files. beneath that directory level i can organize
stuff how i want and change it every time completely. create folders, move
things, rename stuff etc. my script concats always the libs first, then my
bootstrap.js, all my app modules and at last a init.js. every project looks
the same and works the same. it´s compatible with every big frontend framework
and easy to understand.

2.) most bower packages are in js global format. so they just have to be
loaded first at runtime and the order of loading things is very clear.

3.) im aware that browserify aims at some problems like lazy loading or reuse
stuff in the background/frontend but i am not having to deal with those
problems atm. and dont know if i ever have to...

~~~
whatthemick
"with tools like browserify i have to look at the folder structure"

I don't think Browserify cares about your directory structure as long as it
can find the entry file it will figure out the rest based on your require
calls (and also make sure they are in the right order dependency wise)

------
aembleton
OT - does anyone know of a Browserify plugin for sbt?

~~~
acjohnson55
I was just looking for one today. But nope.

