Skip to content

Commit e86a412

Browse files
committed
Merge branch 'master' into version-NEXT
Conflicts: themes/meteor
2 parents f9f0159 + 2f28e8a commit e86a412

File tree

11 files changed

+331
-31
lines changed

11 files changed

+331
-31
lines changed

_config.yml

+281-1
Large diffs are not rendered by default.

long-form/tracker-manual.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ In addition to _property selectors_, you can use a _field selector_ to reduce th
497497

498498
```js
499499
Tracker.autorun(function(){
500-
var postAuthors = Posts.find({}, {fields: {tag: 0, author: 1, title: 0).fetch();
500+
var postAuthors = Posts.find({}, {fields: {tag: 0, author: 1, title: 0}}).fetch();
501501
postAuthors.forEach(function (post) {
502502
console.log(post.author);
503503
});

source/api/accounts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ sites:
186186

187187
- Facebook: <http://developers.facebook.com/docs/authentication/permissions/>
188188
- GitHub: <http://developer.github.com/v3/oauth/#scopes>
189-
- Google: <https://developers.google.com/accounts/docs/OAuth2Login#scopeparameter>
189+
- Google: <https://developers.google.com/identity/protocols/googlescopes>
190190
- Meetup: <http://www.meetup.com/meetup_api/auth/#oauth2-scopes>
191191
- Twitter, Weibo, Meteor developer accounts: `requestPermissions` currently not supported
192192

source/api/assets.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ order: 18
44
description: Documentation of how to use assets in Meteor.
55
---
66

7+
> Currently, it is not possible to import `Assets` as an ES6 module. Any of the `Assets` methods below can simply be called directly in any Meteor server code.
8+
79
`Assets` allows server code in a Meteor application to access static server
810
assets, which are located in the `private` subdirectory of an application's
911
tree. Assets are not processed as source files and are copied directly
1012
into your application's bundle.
1113

1214
{% apibox "Assets.getText" %}
1315
{% apibox "Assets.getBinary" %}
14-
<!-- commented out because this does not exist in master -->
15-
<!-- { % apibox "Assets.absoluteFilePath" %} -->
16+
{% apibox "Assets.absoluteFilePath" %}
1617

1718
Static server assets are included by placing them in the application's `private`
1819
subdirectory. For example, if an application's `private` subdirectory includes a

source/api/methods.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ add the `ddp-rate-limiter` package to your project in your terminal:
201201
meteor add ddp-rate-limiter
202202
```
203203

204-
{% apibox "DDPRateLimiter.addRule" nested:true %}
204+
{% apibox "DDPRateLimiter.addRule" nested:true instanceDelimiter:. %}
205205

206206
Custom rules can be added by calling `DDPRateLimiter.addRule`. The rate
207207
limiter is called on every method and subscription invocation.

source/api/packagejs.md

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Package.onUse(function (api) {
4141
api.export('Email', 'server');
4242
// Specify the source code for the package.
4343
api.addFiles('email.js', 'server');
44+
45+
// When using ecmascript or modules packages, you can use this instead of
46+
// api.export and api.addFiles:
47+
api.mainModule('email.js', 'server');
4448
});
4549

4650
/* This defines the tests for the package */
@@ -59,6 +63,8 @@ Npm.depends({
5963
"stream-buffers": "0.2.5"});
6064
```
6165

66+
`api.mainModule` is documented in the [modules](http://docs.meteor.com/packages/modules.html#Modular-package-structure) section.
67+
6268
Build plugins are created with
6369
[`Package.registerBuildPlugin`](#Package-registerBuildPlugin). See the
6470
coffeescript package for an example. Build plugins are fully-fledged Meteor

source/api/passwords.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,9 @@ On the client, this function logs in as the newly created user on
3030
successful completion. On the server, it returns the newly created user
3131
id.
3232

33-
On the client, you must pass `password` and at least one of `username` or
34-
`email` &mdash; enough information for the user to be able to log in again
35-
later. If there are existing users with a username or email only differing in
36-
case, `createUser` will fail. On the server, you do not need to specify
37-
`password`, but the user will not be able to log in until it has a password (eg,
38-
set with [`Accounts.setPassword`](#accounts_setpassword)).
39-
40-
To create an account without a password on the server and still let the
41-
user pick their own password, call `createUser` with the `email` option
42-
and then
43-
call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This
44-
will send the user an email with a link to set their initial password.
33+
On the client, you must pass `password` and at least one of `username` or `email` &mdash; enough information for the user to be able to log in again later. If there are existing users with a username or email only differing in case, `createUser` will fail. The callback's `error.reason` will be `'Username already exists.'` or `'Email already exists.'` In the latter case, the user can then either [login](accounts.html#Meteor-loginWithPassword) or [reset their password](#Accounts-resetPassword).
34+
35+
On the server, you do not need to specify `password`, but the user will not be able to log in until it has a password (eg, set with [`Accounts.setPassword`](#accounts_setpassword)). To create an account without a password on the server and still let the user pick their own password, call `createUser` with the `email` option and then call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This will send the user an email with a link to set their initial password.
4536

4637
By default the `profile` option is added directly to the new user document. To
4738
override this behavior, use [`Accounts.onCreateUser`](#accounts_oncreateuser).
@@ -59,7 +50,7 @@ insensitive duplicates before updates.
5950

6051
By default, an email address is added with `{ verified: false }`. Use
6152
[`Accounts.sendVerificationEmail`](#Accounts-sendVerificationEmail) to send an
62-
email with a link the user can use verify their email address.
53+
email with a link the user can use to verify their email address.
6354

6455
{% apibox "Accounts.removeEmail" %}
6556

@@ -172,4 +163,8 @@ Accounts.emailTemplates.enrollAccount.text = function (user, url) {
172163
+ " To activate your account, simply click the link below:\n\n"
173164
+ url;
174165
};
166+
Accounts.emailTemplates.resetPassword.from = function () {
167+
// Overrides value set in Accounts.emailTemplates.from when resetting passwords
168+
return "AwesomeSite Password Reset <no-reply@example.com>";
169+
};
175170
```

source/api/pubsub.md

+23-7
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,24 @@ If you return multiple cursors in an array, they currently must all be from
2424
different collections. We hope to lift this restriction in a future release.
2525
{% endpullquote %}
2626

27+
A client will see a document if the document is currently in the published
28+
record set of any of its subscriptions. If multiple publications publish a
29+
document with the same `_id` to the same collection the documents will be
30+
merged for the client. If the values of any of the top level fields
31+
conflict, the resulting value will be one of the published values, chosen
32+
arbitrarily.
33+
2734
```js
28-
// server: publish the rooms collection, minus secret info.
35+
// server: publish the rooms collection, minus secret info...
2936
Meteor.publish("rooms", function () {
3037
return Rooms.find({}, {fields: {secretInfo: 0}});
3138
});
3239

3340
// ... and publish secret info for rooms where the logged-in user
3441
// is an admin. If the client subscribes to both streams, the records
3542
// are merged together into the same documents in the Rooms collection.
43+
// Note that currently object values are not recursively merged, so the
44+
// fields that differ must be top level fields.
3645
Meteor.publish("adminSecretInfo", function () {
3746
return Rooms.find({admin: this.userId}, {fields: {secretInfo: 1}});
3847
});
@@ -134,7 +143,8 @@ project that includes the `autopublish` package. Your publish function
134143
will still work.
135144
{% endpullquote %}
136145

137-
Read more about publications and how to use them in the [Data Loading](http://guide.meteor.com/data-loading.html) article in the Meteor Guide.
146+
Read more about publications and how to use them in the [Data Loading]
147+
(http://guide.meteor.com/data-loading.html) article in the Meteor Guide.
138148

139149
{% apibox "Subscription#userId" %}
140150

@@ -177,7 +187,17 @@ Players = new Mongo.Collection("players");
177187
```
178188

179189
The client will see a document if the document is currently in the published
180-
record set of any of its subscriptions.
190+
record set of any of its subscriptions. If multiple publications publish a
191+
document with the same `_id` for the same collection the documents are merged for
192+
the client. If the values of any of the top level fields conflict, the resulting
193+
value will be one of the published values, chosen arbitrarily.
194+
195+
{% pullquote 'warning' %}
196+
Currently, when multiple subscriptions publish the same document *only the top
197+
level fields* are compared during the merge. This means that if the documents
198+
include different sub-fields of the same top level field, not all of them will
199+
be available on the client. We hope to lift this restriction in a future release.
200+
{% endpullquote %}
181201

182202
The `onReady` callback is called with no arguments when the server [marks the
183203
subscription as ready](#publish_ready). The `onStop` callback is called with
@@ -229,7 +249,3 @@ messages. When you change rooms by calling `Session.set("current-room",
229249
"new-room")`, Meteor will subscribe to the new room's chat messages,
230250
unsubscribe from the original room's chat messages, and continue to
231251
stay subscribed to your private messages.
232-
233-
If more than one subscription sends conflicting values for a field (same
234-
collection name, document ID, and field name), then the value on the client will
235-
be one of the published values, chosen arbitrarily.

source/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Introduction
2+
title: Introducing Meteor API Docs
33
order: 0
44
---
55

@@ -32,3 +32,5 @@ Meteor is a full-stack JavaScript platform for developing modern web and mobile
3232

3333

3434
{% oldRedirects %}
35+
36+
<!-- ABC: hidden comment for cache testing -->

source/packages/accounts-ui.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ To add Accounts and a set of login controls to an application, add the
1111
`accounts-password`, `accounts-facebook`, `accounts-github`,
1212
`accounts-google`, `accounts-twitter`, or `accounts-weibo`.
1313

14-
Then simply add the `{{dstache}}> loginButtons}}` helper to an HTML file. This
14+
Then simply add the `{% raw %}{{> loginButtons}}{% endraw %}` helper to an HTML file. This
1515
will place a login widget on the page. If there is only one provider configured
1616
and it is an external service, this will add a login/logout button. If you use
1717
`accounts-password` or use multiple external login services, this will add
1818
a "Sign in" link which opens a dropdown menu with login options. If you plan to
1919
position the login dropdown in the right edge of the screen, use
20-
`{{dstache}}> loginButtons align="right"}}` in order to get the dropdown to lay
20+
`{% raw %}{{> loginButtons align="right"}}{% endraw %}` in order to get the dropdown to lay
2121
itself out without expanding off the edge of the screen.
2222

23-
To configure the behavior of `{{dstache}}> loginButtons}}`, use
23+
To configure the behavior of `{% raw %}{{> loginButtons}}{% endraw %}`, use
2424
[`Accounts.ui.config`](#accounts_ui_config).
2525

2626
`accounts-ui` also includes modal popup dialogs to handle links from

themes/meteor

0 commit comments

Comments
 (0)