תשובה
Say you have a NODEJS package called BEATLES.
BEATLES package has its own dependency with the SIXTIES module and DRUGS module
Now you have a NODE server application which uses the BEATLES module.
everything is working great.
why is it working great ?
Becuase NODE (console ! , the NODE.exe app) supports the REQUIRE keyword which basically is like referencing a C# dll and start using its public functions.
Example :
var john = require('./myjs.js');
john.sing('lalala');
where myjs.js expose(!) only the function which should be exposed.
that's all fine and already known.
BUT ( and here is where browserify gets is) --- Todays browsers doesn't know the require/import/export keywords. ( well most browsers doesn't know those keywords)
https://developer.mozilla.org/en/docs/web/javascript/reference/statements/import
Browserify reads the file ( which you send to as an argument) and start DIGESTING each MODULe being referenced ( also sub modules) and writes its own code which mimic `require(....)`
so basically it allows require(...) to be recognized by the browser.
why should you use it ?
to allow stupid browsers to know how to work with modules.
modules are known to NODE and not yet to browsers.
Browserify fills that gap
worth to mention :
if you look at jquery code ( jquery , library which has nothing to do in a server app) - DOES also use modules :
http://i.imgur.com/njpo6q2.png
this can allow to use jquer's functions in the node app. and also ( ofcourse) to use :
var jquery = require('./jquery');
jquery.inArray(....) etc....
Was that clear?