core: Rename view to orchestrator

This commit is contained in:
Kevin van Zonneveld 2016-03-07 10:39:46 +01:00
parent 76a7255155
commit 7dbdd2aec7
4 changed files with 4 additions and 3 deletions

View file

@ -53,6 +53,7 @@ Ideas that will be planned and find their way into a release at one point
- [ ] website: Decide on tagline(s) (@kvz, @hedgerh, @arturi, @tim-kos)
- [ ] website: Polish taglines (@arturi)
- [ ] website: scrollbars on code samples (@arturi)
- [x] core: Rename `view` to `orchestrator` (@kvz)
- [x] core: Rename `progress` to `progressindicator` (@kvz)
- [x] website: utilize browserify index exposers to rid ourselves of `../../../..` in examples (@kvz)
- [x] core: Pluralize collections (locales, just l like plugins) (@kvz)

View file

@ -21,7 +21,7 @@ export default class Core {
this.opts = Object.assign({}, defaultOptions, opts)
// Dictates in what order different plugin types are ran:
this.types = [ 'presetter', 'view', 'progressindicator', 'acquirer', 'uploader', 'presenter' ]
this.types = [ 'presetter', 'orchestrator', 'progressindicator', 'acquirer', 'uploader', 'presenter' ]
this.type = 'core'

View file

@ -8,7 +8,7 @@ import Utils from '../core/Utils'
export default class Modal extends Plugin {
constructor (core, opts) {
super(core, opts)
this.type = 'view'
this.type = 'orchestrator'
// set default options
const defaultOptions = {

View file

@ -25,7 +25,7 @@ const files = uppy
1. Core class `Uppy` accepts object `options` (with general options), and exposes methods `.use` for adding plugins and `.set` for setting options.
2. We create a new instance of `Uppy` and call `.use` on it, passing the plugins and their options.
3. Then `run` is called to get things going.
4. Plugins have types: `presetter`, `view`, `progressindicator`, `acquirer`, `uploader`, and `presenter` (more could be added in the future). When `use` is called, each plugins `run` method is added to an array of corresponding types, `methods`.
4. Plugins have types: `presetter`, `orchestrator`, `progressindicator`, `acquirer`, `uploader`, and `presenter` (more could be added in the future). When `use` is called, each plugins `run` method is added to an array of corresponding types, `methods`.
5. Ok, now the tricky part. Cores method `run` iterates over plugin types in a waterfall manner — each `runTypes` runs its `method`s in parallel and returns an array of results (files) to the next plugin type in the waterfall. This way we first get all the of files from `DragDrop`, `Dropbox`, `Instagram` and other inputs — then parse them somehow — and then upload:
![waterfall of parallels](/images/uppy-core-plugins-architecture.jpg)