On Friday, June 1, 2012 2:32:50 AM UTC-4, Diego Varese wrote: > > I have a question regarding these requirement bundlers above mentioned. Is > there one of these that will allow me to include the separate modules > during development while using require(), and then just concat-minify all > of the modules like browserify does for release? >
You can do this with browserify with a little bit of wrangling. See some of my code at https://github.com/NobleJS/WinningJS-todo/blob/e0c6dfb1285a21f0727ca137216b9ad9e1aab930/grunt.js#L27-52 The idea is to build a browserify.js file that contains all the browserify definitions (plus, in my case, the Jade runtime file). Then build a browserify bundle, but instead of writing that file directly, loop through the bundle's files array and pull out the body properties, then write them to individual files. You then need a way to dynamically insert <script> tags for all of those into your HTML, which is another story (we do it using Jade); see the rest of that file. It might be better to try using wreq (https://github.com/substack/wreq) or similar (I think curl [https://github.com/cujojs/curl] also works?) in development; they use an XHR + eval loading technique. -- 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
