Thanks for replying.  I should have been more specific in my question:  how 
do you get all the correct scripts in the right order and compress 
everything into a single request and send it to the client?  I don't want 
to use require.js or any other AMD since performance is spotty over mobile 
networks; I'd rather just patch it all together on the server, compress it, 
and send it.

On Tuesday, February 26, 2013 5:21:39 AM UTC-5, Alexey Petrushin wrote:
>
> > How do you handle dependencies in purely client-side code?
>
> I use it exactly in the same way it would be used in node.js. From my 
> point of view it's the point of browserify - environment is exaclty the 
> same in both browser and server.
>
> File app.js
>
> NavigationView = require('./app/views/navigation')
> OtherView          = require('./app/views/login')
> ....
>
> File NavigationView.js
>
> ...
>    // By using require hooks it requires `template.mustache` file and 
> compiles it to js.
>    require('./template').render(someVariables)
> ...
>
> So, basically there's no any build or package specific scripts - it just 
> works (except for tiny script packaging some vendor dependencies like 
> jquery and backbone).
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to