-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run optimize #275
Run optimize #275
Changes from 1 commit
fe0b5c4
ae1a4c3
4801c71
9cf8e04
1c3823a
eeac9d0
cac4d48
8f40ff4
a5b438b
5dcef37
3779998
b15e11c
09021d9
dfbf0f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,13 +204,32 @@ modules. | |
sequencer.run(); | ||
``` | ||
|
||
Sequencer can be run with a custom progress object | ||
|
||
```js | ||
// The progressObj object enables custom progress bars in node environment | ||
sequencer.run(progressObj); | ||
|
||
``` | ||
|
||
Sequencer can also be run from a particular index(of steps array) | ||
|
||
```js | ||
//This runs steps only after the index(eg. 0 runs all steps) | ||
sequencer.run(index); | ||
|
||
``` | ||
|
||
Additionally, an optional callback can be passed to this method. | ||
|
||
```js | ||
sequencer.run(function(out){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's name the function There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh great Idea!! |
||
// this gets called back. | ||
// "out" is the DataURL of the final image. | ||
}); | ||
sequencer.run(index/progressObj,function(out){ | ||
// the callback is supported with all types of invocations | ||
}); | ||
``` | ||
|
||
return value: **`sequencer`** (To allow method chaining) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just above here, where we introduce
.run()
, let's say:What do you think of this? Just really thorough, lots of examples, and link to the tests where we demonstrate it all working? The tests could be moved into a
run.js
test file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jywarren this is awesome, I can do this, this is really explanatory!! Let's first complete the urlSteps PR then rebase to avoid merge conflicts later since this is on an old fork!!