Files
meteor/packages/meteor-base/package.js
James Burgess 4ebf089d88 Remove underscore from meteor-base (#9596)
This should shave down bundle sizes by 14.4 kb for many non-blaze projects.

The other core meteor packages have not depended on `underscore` since #9362. However, we are only able to remove this last dependency now due to the previous commit, which eliminated usages of `underscore` from apps that did not have the package listed in their `packages` files. This was causing CI test failures that now should be corrected.

Any meteor apps currently using `_` without `underscore` listed in their `packages` file will need to add the package explicitly.

Version number of `meteor-base` bumped from 1.3.0 to 1.4.0.

There are only a few uses of `underscore` in these apps, and two of them actually used `underscore` without having it explicitly listed in their `packages` file.

This is a problem, because the apps were relying on the dependency from `meteor-base`, which we want to remove to cut down bundle sizes.

For the `modules` test app, I've added `underscore` to the `packages` file, because it is using `_` in an assertion about the module system. For the other app and all other uses of `_`, rather than add `underscore` to the `packages` files, I took the modernization route and replaced the functions with their ES6 equivalents, and then removed `underscore` from all `packages` files.
2018-03-07 11:23:52 -05:00

34 lines
1.1 KiB
JavaScript

Package.describe({
name: 'meteor-base',
version: '1.4.0',
// Brief, one-line summary of the package.
summary: 'Packages that every Meteor app needs',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, set this field to null.
documentation: 'README.md'
});
Package.onUse(function(api) {
api.imply([
// Super basic stuff about where your code is running and async utilities
'meteor',
// This package enables making client-server connections; currently Meteor
// only supports building client/server web applications so this is not
// removable
'webapp',
// The protocol and client/server libraries that Meteor uses to send data
'ddp',
'livedata', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0.
// This package uses the user agent of each incoming HTTP request to
// decide whether to inject <script> tags into the <head> of the
// response document to polyfill ECMAScript 5 support.
'es5-shim',
// Push code changes to the client and automatically reload the page
'hot-code-push'
]);
});