不要怂,就是干,撸起袖子干!

Commit 4c81d9fd by Jan Aagaard Meier

Merge pull request #5623 from alexpls/update-bluebird-links

[ci skip] Docs: Update links to Bluebird API docs
2 parents ffc59576 61beb585
...@@ -22,9 +22,9 @@ We're glad to get pull request if any functionality is missing or something is b ...@@ -22,9 +22,9 @@ We're glad to get pull request if any functionality is missing or something is b
* Explain the issue that your PR is solving - or link to an existing issue * Explain the issue that your PR is solving - or link to an existing issue
* Make sure that all existing tests pass * Make sure that all existing tests pass
* Add some tests for your new functionality or a test exhibiting the bug you are solving. Ideally all new tests should not pass _without_ your changes. * Add some tests for your new functionality or a test exhibiting the bug you are solving. Ideally all new tests should not pass _without_ your changes.
- Use [promise style](https://github.com/petkaantonov/bluebird#what-are-promises-and-why-should-i-use-them) in all new tests. Specifically this means: - Use [promise style](http://bluebirdjs.com/docs/why-promises.html) in all new tests. Specifically this means:
- don't use `EventEmitter`, `QueryChainer` or the `success`, `done` and `error` events - don't use `EventEmitter`, `QueryChainer` or the `success`, `done` and `error` events
- don't use nested callbacks (use [Promise.bind](https://github.com/petkaantonov/bluebird/blob/master/API.md#binddynamic-thisarg---promise) to maintain context in promise chains) - don't use nested callbacks (use [Promise.bind](http://bluebirdjs.com/docs/api/promise.bind.html) to maintain context in promise chains)
- don't use a done callback in your test, just return the promise chain. - don't use a done callback in your test, just return the promise chain.
- Small bugfixes and direct backports to the 1.7 branch are accepted without tests. - Small bugfixes and direct backports to the 1.7 branch are accepted without tests.
* If you are adding to / changing the public API, remember to add API docs, in the form of [JSDoc style](http://usejsdoc.org/about-getting-started.html) comments. See [section 4a](#4a-check-the-documentation ) for the specifics. * If you are adding to / changing the public API, remember to add API docs, in the form of [JSDoc style](http://usejsdoc.org/about-getting-started.html) comments. See [section 4a](#4a-check-the-documentation ) for the specifics.
......
...@@ -83,7 +83,7 @@ var Post = sequelize.define('post', {}, { ...@@ -83,7 +83,7 @@ var Post = sequelize.define('post', {}, {
``` ```
## Promises ## Promises
Sequelize uses promises to control async control-flow. If you are unfamiliar with how promises work, now might be a good time to brush up on them, [here](https://github.com/wbinnssmith/awesome-promises) and [here](https://github.com/petkaantonov/bluebird#what-are-promises-and-why-should-i-use-them) Sequelize uses promises to control async control-flow. If you are unfamiliar with how promises work, now might be a good time to brush up on them, [here](https://github.com/wbinnssmith/awesome-promises) and [here](http://bluebirdjs.com/docs/why-promises.html)
Basically a promise represents a value which will be present at some point - "I promise you I will give you a result or an error at some point". This means that Basically a promise represents a value which will be present at some point - "I promise you I will give you a result or an error at some point". This means that
...@@ -102,4 +102,4 @@ User.findOne().then(function (user) { ...@@ -102,4 +102,4 @@ User.findOne().then(function (user) {
}); });
``` ```
Once you've got the hang of what promises are and how they work, use the [bluebird API reference](https://github.com/petkaantonov/bluebird/blob/master/API.md) as your go to tool. In particular, you'll probably be using [`.all`](https://github.com/petkaantonov/bluebird/blob/master/API.md#all---promise) a lot. Once you've got the hang of what promises are and how they work, use the [bluebird API reference](http://bluebirdjs.com/docs/api-reference.html) as your go to tool. In particular, you'll probably be using [`.all`](http://bluebirdjs.com/docs/api/promise.all.html) a lot.
...@@ -664,4 +664,4 @@ sequelize.define('user', {}, { ...@@ -664,4 +664,4 @@ sequelize.define('user', {}, {
[0]: #configuration [0]: #configuration
[3]: https://github.com/chriso/validator.js [3]: https://github.com/chriso/validator.js
[5]: /docs/latest/misc#asynchronicity [5]: /docs/latest/misc#asynchronicity
[6]: https://github.com/petkaantonov/bluebird/blob/master/API.md#spreadfunction-fulfilledhandler--function-rejectedhandler----promise [6]: http://bluebirdjs.com/docs/api/spread.html
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!