Files
meteor/tools
David Glasser 7e4f720e8e Implement weak dependencies.
A normal dependency of X on Y consists of a "must-use" constraint ("if X is
loaded, Y must be loaded too") and an "ordering" constraint ("if X and Y are
both loaded, Y must be loaded before X").

The previously-existing support for "unordered" dependencies allows you to
create a dependency with "must-use" but not "ordering".  This commit adds "weak"
dependencies, which have "ordering" but not "must-use".

As an example, the accounts-base package wants to define some Handlebars helpers
like {{currentUser}} if the handlebars package is being used, but it's fine to
use accounts-base without handlebars. So it should declare a weak dependency on
handlebars.

A package can tell if another package has already been loaded by checking to see
if `Packages.foo` exists. (So as a result, even slices which export no variables
get a `Packages.foo = {}` line.) Weak dependencies do not import symbols into
your namespace; you must access their symbols through
`Packages.foo.someExportedSymbol`. You don't get to use plugins from your weak
dependency.
2013-06-26 12:34:42 -07:00
..
2013-06-18 17:13:06 -07:00
2013-05-13 11:58:57 -07:00
2013-06-26 12:34:42 -07:00
2013-06-14 17:01:47 -07:00
2013-03-29 11:52:33 -07:00
2013-06-26 12:34:42 -07:00
2013-06-26 12:34:42 -07:00
2013-06-13 16:23:24 -07:00