Skip to content

Commit

Permalink
Classes split (#315)
Browse files Browse the repository at this point in the history
* Split up Flow.js into distinct classes and rely upon build-time assembly.

- `$` shorthand symbol was removed in favor of `this` and context has been taken care of (including for event handlers)
- _real_ class methods replace the former simili-constructor syntax
- started replacing a couple `each()` by `for..of` when it helped getting rid of significant context switch complexity.
- FlowFile and evalOpts (counter-intuitive) bindings into Flow namespace had to be dirtily reproduced because the Grunt/Karma/Jasmine hardly support full ES6 import within spec files.
- tests adapted
- flow.support is removed
  1. Because if there is no `window`, user are on their own and there is no reason keeping node.js from loading the code
  2. Because `support` rather depend on the transpilation and polyfills part of the final build issues by the toolchain
  => Avoid cluttering bootstrap with a runtime check.
* fix onDrop.bind() which was then impossible to remove
  • Loading branch information
Raphaël Droz authored Oct 15, 2020
1 parent 8f49203 commit 25709e7
Show file tree
Hide file tree
Showing 11 changed files with 3,547 additions and 3,361 deletions.
3,556 changes: 1,891 additions & 1,665 deletions dist/flow.js

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions dist/flow.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let plugins = [

export default [
{
input: 'src/flow.js',
input: 'src/Flow.js',
plugins,
output: {
name: 'Flow',
Expand All @@ -28,7 +28,7 @@ export default [
},
},
{
input: 'src/flow.js',
input: 'src/Flow.js',
plugins: plugins.concat([terser()]),
output: {
name: 'Flow',
Expand Down
Loading

0 comments on commit 25709e7

Please sign in to comment.