Skip to content

Commit

Permalink
switch to quill-delta
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Oct 9, 2016
1 parent 7fa48ea commit 75acfa6
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 40 deletions.
54 changes: 40 additions & 14 deletions _develop/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,51 @@ module.exports = {
},
resolve: {
alias: {
'parchment': path.resolve(__dirname, '..', 'node_modules/parchment/src/parchment')
'parchment': path.resolve(__dirname, '../node_modules/parchment')
},
extensions: ['', '.js', '.styl', '.ts']
},
module: {
loaders: [
{ test: /parchment\/src\/.*\.ts$/, loader: 'ts' },
{ test: /\.styl$/, loader: ExtractTextPlugin.extract('style', 'css!stylus') },
{ test: /\.svg$/, loader: 'html?minimize=true' },
{
test: /\.js$/,
exclude: [/node_modules/, /rich-text/],
loader: 'babel',
query: {
presets: ['es2015']
// plugins: ['transform-es2015-modules-commonjs']
}
loaders: [{
loader: 'ts',
test: /\.ts$/,
include: [
path.resolve(__dirname, '../node_modules/parchment')
]
}, {
loader: ExtractTextPlugin.extract('style', 'css!stylus'),
test: /\.styl$/,
include: [
path.resolve(__dirname, '../assets')
]
}, {
loader: 'html',
test: /\.svg$/,
include: [
path.resolve(__dirname, '../assets/icons')
],
query: {
minimize: true
}
],
}, {
loader: 'babel',
test: /\.js$/,
include: [
path.resolve(__dirname, '../quill.js'),
path.resolve(__dirname, '../core.js'),
path.resolve(__dirname, '../blots'),
path.resolve(__dirname, '../core'),
path.resolve(__dirname, '../formats'),
path.resolve(__dirname, '../modules'),
path.resolve(__dirname, '../test'),
path.resolve(__dirname, '../themes'),
path.resolve(__dirname, '../ui')
],
query: {
presets: ['es2015']
// plugins: ['transform-es2015-modules-commonjs']
}
}],
noParse: [
/\/node_modules\/clone\/clone\.js$/,
/\/node_modules\/eventemitter3\/index\.js$/,
Expand Down
2 changes: 1 addition & 1 deletion blots/block.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import extend from 'extend';
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Parchment from 'parchment';
import Break from './break';
import Embed from './embed';
Expand Down
4 changes: 2 additions & 2 deletions core/editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Delta from 'rich-text/lib/delta';
import DeltaOp from 'rich-text/lib/op';
import Delta from 'quill-delta';
import DeltaOp from 'quill-delta/lib/op';
import Emitter from './emitter';
import Parchment from 'parchment';
import CodeBlock from '../formats/code';
Expand Down
2 changes: 1 addition & 1 deletion core/quill.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './polyfill';
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from './editor';
import Emitter from './emitter';
import Module from './module';
Expand Down
2 changes: 1 addition & 1 deletion formats/code.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Parchment from 'parchment';
import Block from '../blots/block';
import Inline from '../blots/inline';
Expand Down
2 changes: 1 addition & 1 deletion formats/list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import extend from 'extend';
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Parchment from 'parchment';
import Block from '../blots/block';
import Container from '../blots/container';
Expand Down
2 changes: 1 addition & 1 deletion modules/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Parchment from 'parchment';
import Quill from '../core/quill';
import logger from '../core/logger';
Expand Down
4 changes: 2 additions & 2 deletions modules/keyboard.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import clone from 'clone';
import equal from 'deep-equal';
import extend from 'extend';
import Delta from 'rich-text/lib/delta';
import DeltaOp from 'rich-text/lib/op';
import Delta from 'quill-delta';
import DeltaOp from 'quill-delta/lib/op';
import Parchment from 'parchment';
import Quill from '../core/quill';
import logger from '../core/logger';
Expand Down
2 changes: 1 addition & 1 deletion modules/toolbar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import extend from 'extend';
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Parchment from 'parchment';
import Quill from '../core/quill';
import logger from '../core/logger';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"eventemitter3": "~2.0.1",
"extend": "~3.0.0",
"parchment": "1.0.1",
"rich-text": "~3.0.2"
"quill-delta": "3.1.0"
},
"devDependencies": {
"babel-core": "^6.16.0",
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/unit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../core/editor';
import Emitter from '../../core/emitter';
import Selection from '../../core/selection';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/core/editor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';
import Emitter from '../../../core/emitter';
import Selection, { Range } from '../../../core/selection';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/core/quill.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Quill, { expandConfig, overload } from '../../../core/quill';
import Theme from '../../../core/theme';
import Emitter from '../../../core/emitter';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/core/selection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Selection, { Range } from '../../../core/selection';
import Cursor from '../../../blots/cursor';
import Scroll from '../../../blots/scroll';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/align.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';


Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/code.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Parchment from 'parchment';
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';
import CodeBlock from '../../../formats/code';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/color.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';


Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';


Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/indent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';


Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/link.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';
import Link from '../../../formats/link';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';


Expand Down
2 changes: 1 addition & 1 deletion test/unit/formats/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Editor from '../../../core/editor';


Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import { Range } from '../../../core/selection';
import Quill from '../../../core';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/history.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Quill from '../../../core';
import { getLastChangeIndex } from '../../../modules/history';

Expand Down
2 changes: 1 addition & 1 deletion themes/base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import extend from 'extend';
import Delta from 'rich-text/lib/delta';
import Delta from 'quill-delta';
import Emitter from '../core/emitter';
import Keyboard from '../modules/keyboard';
import Theme from '../core/theme';
Expand Down

0 comments on commit 75acfa6

Please sign in to comment.