Commit graph

2 commits

Author SHA1 Message Date
Murod Khaydarov
551ae9e381 Merge branch 'rewriting-version2.0' into improvements
# Conflicts:
#	build/codex-editor.js
#	build/codex-editor.js.map
2017-12-19 21:22:44 +03:00
Peter Savchenko
2df18b00b0
Module abstract (#226)
* Abstract Module class

Now all modules inherits from `Module` class. You don’t need more to
write

```js
constructor({ config }) {
        this.Editor = null;
        this.config = config;
}
```
and

```js
    /**
     * @param Editor
     * @param Editor.modules {@link CodexEditor#moduleInstances}
     * @param Editor.config {@link CodexEditor#configuration}
     */
    set state(Editor) {

        this.Editor = Editor;

    }
```

## Default exports improved

Now you don’t need more to write `.default` on module requiring

```js
let module = require(‘module’).default;
```

* Update docs
2017-12-11 13:24:46 +03:00