jQuery dependency package.js changes

This commit is contained in:
David Greenspan
2012-09-17 14:42:14 -07:00
parent 660882eb4e
commit ce4e415bb7
3 changed files with 9 additions and 6 deletions

View File

@@ -34,6 +34,8 @@ DomUtils = {};
// - apps that want jQuery's selector extensions (:visible, :input, etc.)
// - apps that include jQuery anyway
// - apps that want IE 7 support
//
// XXX others? zepto?
var findAllBySelector = (window.Sizzle
|| (window.jQuery && window.jQuery.find)
|| qsaFindAllBySelector);

View File

@@ -4,7 +4,14 @@ Package.describe({
});
Package.on_use(function (api) {
// XXX
// Doesn't actually require jQuery (but uses it if available).
//
// For now we are going to keep shipping jQuery with all apps
// so as not to break existing apps, but any time now we will
// cut this dependency.
api.use('jquery', 'client');
api.add_files('domutils.js', 'client');
});

View File

@@ -7,12 +7,6 @@ Package.on_use(function (api) {
api.use(['underscore', 'uuid', 'domutils', 'liverange', 'universal-events'],
'client');
// XXX Depends on jquery because we need a selector engine to resolve
// event maps. What would be nice is, if you've included jquery or
// zepto, use one of those; if not, ship our own copy of sizzle (but,
// you still want the event object normalization that jquery provides?)
api.use('jquery');
api.add_files(['spark.js', 'patch.js', 'convenience.js'], 'client');
});