Package.registerBuildPlugin

package.js Package.registerBuildPlugin([options]) Define a build plugin. A build plugin extends the build process for apps and packages that use this package. For example, the coffeescript package uses a build plugin to compile CoffeeScript source files into JavaScript. Options name String A cosmetic name, must be unique in the package. use String or Array of Strings Meteor packages that this plugin uses, independent of the packages specified in api.onUse. sources Array of Strin

api.versionsFrom

package.js api.versionsFrom(meteorRelease) Use versions of core packages from a release. Unless provided, all packages will default to the versions released along with meteorRelease. This will save you from having to figure out the exact versions of the core packages you want to use. For example, if the newest release of meteor is METEOR@0.9.0 and it includes jquery@1.0.0, you can write api.versionsFrom('METEOR@0.9.0') in your package, and when you later write api.use('jquery'), it will b

Npm.depends

package.js Npm.depends(dependencies) Specify which NPM packages your Meteor package depends on. Arguments dependencies Object An object where the keys are package names and the values are one of: Version numbers in string form Http(s) URLs to a git commit by SHA. Git URLs in the format described here Https URL example: Npm.depends({ moment: "2.8.3", async: "https://github.com/caolan/async/archive/71fa2638973dafd8761fa5457c472a312cc820fe.tar.gz" }); Git URL example: Npm.depends({

Tracker.onInvalidate

Client Tracker.onInvalidate(callback) import { Tracker } from 'meteor/tracker' Source Registers a new onInvalidate callback on the current computation (which must exist), to be called immediately when the current computation is invalidated or stopped. Arguments callback Function A callback function that will be invoked as func(c), where c is the computation on which the callback is registered.

Meteor.subscribe

Client Meteor.subscribe(name, [arg1, arg2...], [callbacks]) import { Meteor } from 'meteor/meteor' Source Subscribe to a record set. Returns a handle that provides stop() and ready() methods. Arguments name String Name of the subscription. Matches the name of the server's publish() call. arg1, arg2... EJSON-able Object Optional arguments passed to publisher function on server. callbacks Function or Object Optional. May include onStop and onReady callbacks. If there is an erro

api.addFiles

package.js api.addFiles(filenames, [architecture], [options]) Specify source code files for your package. Arguments filenames String or Array of Strings Paths to the source files. architecture String or Array of Strings If you only want to use the file on the server (or the client), you can pass this argument (e.g., 'server', 'client', 'web.browser', 'web.cordova') to specify what architecture the file is used with. You can specify multiple architectures by passing in an array, fo

Package.describe

Package Description Provide basic package information with Package.describe(options). To publish a package, you must define summary and version. package.js Package.describe(options) Provide basic package information. Options summary String A concise 1-2 sentence description of the package, required for publication. version String The (extended) semver version for your package. Additionally, Meteor allows a wrap number: a positive integer that follows the version number. If you a

Meteor.reconnect

Client Meteor.reconnect() import { Meteor } from 'meteor/meteor' Source Force an immediate reconnection attempt if the client is not connected to the server. This method does nothing if the client is already connected.

cursor.map

Anywhere cursor.map(callback, [thisArg]) Source Map callback over all matching documents. Returns an Array. Arguments callback Function Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself. thisArg Any An object which will be the value of this inside callback.

EJSON.addType

Anywhere EJSON.addType(name, factory) import { EJSON } from 'meteor/ejson' Source Add a custom datatype to EJSON. Arguments name String A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method. factory Function A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.