I use LABjs to dynamically insert a set of 3 scripts I use a lot (which includes my main library).
On the page itself I then call an init() function and pass through an object literal of components that the current page needs. Within my library, in my init function I do some if statements checking for the args passed through and then use LABjs again to insert more scripts if the component requires them. Not sure if that is the best way to do things but it works well for me. Let me know what you think. Sent from my iPhone On 6 Mar 2011, at 05:29, fernando trasvina <[email protected]> wrote: > if you have something were you have that much control you should take a look > on how other systems like YUI and labjs (i guess) declare dependencies > and make your system to read them and include them in the right order. i > would really like to hear on this matter because when packages get too big it > becomes a lil problem. > > > On Mar 5, 2011, at 10:45 PM, Peter Michaux wrote: > >> On Sat, Mar 5, 2011 at 2:01 PM, fernando trasvina <[email protected]> wrote: >>> In my process i configure one file that has the list of the files on the >>> packages. >>> >>> in the company i currently work we use ruby >>> >>> so we have a yaml file as the config file for jammit (the gem that packages >>> the files) >> >> Thanks for mentioning Jammit. >> >> http://documentcloud.github.com/jammit/ >> >> We don't use Ruby but did home grow an almost identical system for our >> code base. I don't really like having to do manual dependency >> resolution in a configuration file. It works but is getting more >> onerous with the project size growing. >> >> Peter >> >> -- >> To view archived discussions from the original JSMentors Mailman list: >> http://www.mail-archive.com/[email protected]/ >> >> To search via a non-Google archive, visit here: >> http://www.mail-archive.com/[email protected]/ >> >> To unsubscribe from this group, send email to >> [email protected] > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
