Open raldred opened 12 years ago
+1; this would be particularly nice for things like the Rails asset pipeline, Snockets/connect-assets in Node, etc.
Yeah, totally makes sense. I started bundling yepnope because I only wanted to include jQuery when needed. However I think it got a bit out of hand. ;)
Will have a shot at this in the next major update. :)
Cool, cheers, I don't mind chipping in, looking at your code, it's nicely separated so should be pretty easy to switch this around.
Actually... every browser stops execution on every script within your <body>
for a short time to (download and) handle it. So... with the number of modules in DarkTip you might use (or not) your website performance would go down as hell (and with it your PageRank btw.). Of course you can place all the scritpts in the head, but that doesn't actually help very much. I guess, a main reason of using yepnope instead is, that it can load all modules asynchronously.
But, to be honest I'm also not happy with the jQuery approach. Probably the best way would be setting up some kind of package builder (like http://jqueryui.com/download). So with it every webmaster could build his own All-in-One-scriptfile. (... and with that you could ship minified versions! ;D)
@exochron : that's what I'm aiming for, yes. Will take some time to get there though. Right now I don't have much time to push the project forward. But updates will be coming, sooner or later. :)
Personally I would prefer this to be kept very simple, it makes it much more flexible for individual needs if the libarary doesn't automate too much of it's dependencies. unless of course you switch to AMD
@raldred : I will try to make any dependency toggleable. You should be able to tailor the package to anything you might need. Hopefully... ;)
This would be a really cool feature. Currently developing a guild site base on bootstrap, so I want to use its features (tooltips, popovers etc). It would be good to choose which libaries are loaded and an easy way to control the output of darktip to create tooltips.
At the moment, darktip loads all its dependencies automatically. The problem with this approach is..
I would prefer a much simpler approach where you just manually include the modules that you need into your page. Then also there'd be no need for the settings hash if it's only telling the plugin what modules to load. eg.
This way all js can be run through an asset pipeline.
What do you think?
--Rob