Skip to content

Commit

Permalink
Depend on gulf & ot-text directly + Use it per default
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed Oct 8, 2016
1 parent 3916ba1 commit 8ed5c61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"description": "Convenient gulf wrapper for codemirror (uses shareaJS's textOT)",
"dependencies": {
"babel-runtime": "^6.11.6",
"core-js": "2.x"
},
"peerDependencies": {
"core-js": "2.x",
"gulf": "5.x",
"ot-text": "1.x"
},
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var gulf = require('gulf')
, textOT = require('ot-text').type

class CodemirrorDocument extends gulf.EditableDocument {
constructor(opts) {
opts.ottype = opts.ottype || textOT
super(opts)
if (!opts.editorInstance) throw new Error('No codemirror instance was passed')
this.cm = opts.editorInstance
Expand Down

0 comments on commit 8ed5c61

Please sign in to comment.