Files
meteor/packages/underscore/package.js
Ben Newman 232ab2d209 Bump package versions for 1.4.2-beta.9 release.
I had to scrap the 1.4.2-beta.8 release because meteor-tool@1.4.2-beta.8
got published by a partial run of the publish-release script, but then the
publish-release script thought meteor-tool changed after that, and I
didn't want to republish it as something like 1.4.2-1-beta.8.
2016-10-05 18:42:56 -04:00

37 lines
1.5 KiB
JavaScript

Package.describe({
summary: "Collection of small helpers: _.map, _.each, ...",
version: '1.0.10-beta.9'
});
Package.onUse(function (api) {
// Like all packages, we have an implicit depedency on the 'meteor'
// package, which provides such things as the *.js file handler. Use
// an undocumented API to allow 'meteor' to alter us even though we
// depend on it. This is necessary since 'meteor' depends on us. One
// day we will avoid this problem by refactor, but for now this is a
// practical and expedient solution.
//
// XXX Now the *.js handler is intrinsic rather than coming from the
// 'meteor' package and we could remove this (if we provided a way
// to let the package opt to not depend on 'meteor'.) We could even
// remove unordered dependency support, though I think it's worth keeping
// around for now to keep the possibility of dependency
// configuration alive in the codebase.
api.use('meteor', {unordered: true});
api.export('_');
// NOTE: we patch _.each and various other functions that polymorphically take
// objects, arrays, and array-like objects (such as the querySelectorAll
// return value, document.images, and 'arguments') such that objects with a
// numeric length field whose constructor === Object are still treated as
// objects, not as arrays. Search for looksLikeArray.
api.addFiles(['pre.js', 'underscore.js', 'post.js']);
});
Package.onTest(function (api) {
// Also turn off the strong 'meteor' dependency in the test slice
api.use('meteor', {unordered: true});
});