@pie-lib/editable-html 11.1.1 → 11.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -4
- package/NEXT.CHANGELOG.json +1 -0
- package/lib/__tests__/editor.test.js +470 -0
- package/lib/__tests__/serialization.test.js +246 -0
- package/lib/__tests__/utils.js +106 -0
- package/lib/block-tags.js +25 -0
- package/lib/constants.js +16 -0
- package/lib/editor.js +349 -88
- package/lib/index.js +26 -10
- package/lib/parse-html.js +1 -1
- package/lib/plugins/characters/custom-popper.js +1 -1
- package/lib/plugins/characters/index.js +9 -4
- package/lib/plugins/characters/utils.js +13 -13
- package/lib/plugins/css/icons/index.js +37 -0
- package/lib/plugins/css/index.js +397 -0
- package/lib/plugins/customPlugin/index.js +114 -0
- package/lib/plugins/html/icons/index.js +1 -1
- package/lib/plugins/html/index.js +12 -8
- package/lib/plugins/image/__tests__/component.test.js +51 -0
- package/lib/plugins/image/__tests__/image-toolbar-logic.test.js +56 -0
- package/lib/plugins/image/__tests__/image-toolbar.test.js +26 -0
- package/lib/plugins/image/__tests__/index.test.js +98 -0
- package/lib/plugins/image/__tests__/insert-image-handler.test.js +125 -0
- package/lib/plugins/image/__tests__/mock-change.js +25 -0
- package/lib/plugins/image/alt-dialog.js +1 -1
- package/lib/plugins/image/component.js +1 -1
- package/lib/plugins/image/image-toolbar.js +1 -1
- package/lib/plugins/image/index.js +3 -2
- package/lib/plugins/image/insert-image-handler.js +14 -5
- package/lib/plugins/index.js +271 -12
- package/lib/plugins/list/__tests__/index.test.js +79 -0
- package/lib/plugins/list/index.js +131 -1
- package/lib/plugins/math/__tests__/index.test.js +300 -0
- package/lib/plugins/math/index.js +92 -57
- package/lib/plugins/media/__tests__/index.test.js +71 -0
- package/lib/plugins/media/index.js +6 -3
- package/lib/plugins/media/media-dialog.js +99 -58
- package/lib/plugins/media/media-toolbar.js +1 -1
- package/lib/plugins/media/media-wrapper.js +1 -1
- package/lib/plugins/rendering/index.js +46 -0
- package/lib/plugins/respArea/drag-in-the-blank/choice.js +6 -3
- package/lib/plugins/respArea/drag-in-the-blank/index.js +1 -1
- package/lib/plugins/respArea/explicit-constructed-response/index.js +12 -10
- package/lib/plugins/respArea/icons/index.js +1 -1
- package/lib/plugins/respArea/index.js +70 -22
- package/lib/plugins/respArea/inline-dropdown/index.js +11 -6
- package/lib/plugins/respArea/math-templated/index.js +130 -0
- package/lib/plugins/respArea/utils.js +17 -2
- package/lib/plugins/table/CustomTablePlugin.js +133 -0
- package/lib/plugins/table/__tests__/index.test.js +442 -0
- package/lib/plugins/table/__tests__/table-toolbar.test.js +54 -0
- package/lib/plugins/table/icons/index.js +1 -1
- package/lib/plugins/table/index.js +44 -60
- package/lib/plugins/table/table-toolbar.js +34 -5
- package/lib/plugins/textAlign/icons/index.js +226 -0
- package/lib/plugins/textAlign/index.js +34 -0
- package/lib/plugins/toolbar/__tests__/default-toolbar.test.js +128 -0
- package/lib/plugins/toolbar/__tests__/editor-and-toolbar.test.js +51 -0
- package/lib/plugins/toolbar/__tests__/toolbar-buttons.test.js +54 -0
- package/lib/plugins/toolbar/__tests__/toolbar.test.js +120 -0
- package/lib/plugins/toolbar/default-toolbar.js +83 -28
- package/lib/plugins/toolbar/done-button.js +6 -3
- package/lib/plugins/toolbar/editor-and-toolbar.js +19 -20
- package/lib/plugins/toolbar/index.js +1 -1
- package/lib/plugins/toolbar/toolbar-buttons.js +45 -12
- package/lib/plugins/toolbar/toolbar.js +36 -12
- package/lib/plugins/utils.js +1 -1
- package/lib/serialization.js +234 -45
- package/lib/theme.js +1 -1
- package/package.json +6 -6
- package/src/__tests__/editor.test.jsx +363 -0
- package/src/__tests__/serialization.test.js +291 -0
- package/src/__tests__/utils.js +36 -0
- package/src/block-tags.js +17 -0
- package/src/constants.js +7 -0
- package/src/editor.jsx +303 -49
- package/src/index.jsx +19 -10
- package/src/plugins/characters/index.jsx +11 -3
- package/src/plugins/characters/utils.js +12 -12
- package/src/plugins/css/icons/index.jsx +17 -0
- package/src/plugins/css/index.jsx +346 -0
- package/src/plugins/customPlugin/index.jsx +85 -0
- package/src/plugins/html/index.jsx +9 -6
- package/src/plugins/image/__tests__/__snapshots__/component.test.jsx.snap +51 -0
- package/src/plugins/image/__tests__/__snapshots__/image-toolbar-logic.test.jsx.snap +27 -0
- package/src/plugins/image/__tests__/__snapshots__/image-toolbar.test.jsx.snap +44 -0
- package/src/plugins/image/__tests__/component.test.jsx +41 -0
- package/src/plugins/image/__tests__/image-toolbar-logic.test.jsx +42 -0
- package/src/plugins/image/__tests__/image-toolbar.test.jsx +11 -0
- package/src/plugins/image/__tests__/index.test.js +95 -0
- package/src/plugins/image/__tests__/insert-image-handler.test.js +113 -0
- package/src/plugins/image/__tests__/mock-change.js +15 -0
- package/src/plugins/image/index.jsx +2 -1
- package/src/plugins/image/insert-image-handler.js +13 -6
- package/src/plugins/index.jsx +248 -5
- package/src/plugins/list/__tests__/index.test.js +54 -0
- package/src/plugins/list/index.jsx +130 -0
- package/src/plugins/math/__tests__/__snapshots__/index.test.jsx.snap +48 -0
- package/src/plugins/math/__tests__/index.test.jsx +245 -0
- package/src/plugins/math/index.jsx +87 -56
- package/src/plugins/media/__tests__/index.test.js +75 -0
- package/src/plugins/media/index.jsx +3 -2
- package/src/plugins/media/media-dialog.js +106 -57
- package/src/plugins/rendering/index.js +31 -0
- package/src/plugins/respArea/drag-in-the-blank/choice.jsx +4 -1
- package/src/plugins/respArea/explicit-constructed-response/index.jsx +10 -8
- package/src/plugins/respArea/index.jsx +53 -7
- package/src/plugins/respArea/inline-dropdown/index.jsx +13 -6
- package/src/plugins/respArea/math-templated/index.jsx +104 -0
- package/src/plugins/respArea/utils.jsx +11 -0
- package/src/plugins/table/CustomTablePlugin.js +113 -0
- package/src/plugins/table/__tests__/__snapshots__/table-toolbar.test.jsx.snap +44 -0
- package/src/plugins/table/__tests__/index.test.jsx +401 -0
- package/src/plugins/table/__tests__/table-toolbar.test.jsx +42 -0
- package/src/plugins/table/index.jsx +46 -59
- package/src/plugins/table/table-toolbar.jsx +39 -2
- package/src/plugins/textAlign/icons/index.jsx +139 -0
- package/src/plugins/textAlign/index.jsx +23 -0
- package/src/plugins/toolbar/__tests__/__snapshots__/default-toolbar.test.jsx.snap +923 -0
- package/src/plugins/toolbar/__tests__/__snapshots__/editor-and-toolbar.test.jsx.snap +20 -0
- package/src/plugins/toolbar/__tests__/__snapshots__/toolbar-buttons.test.jsx.snap +36 -0
- package/src/plugins/toolbar/__tests__/__snapshots__/toolbar.test.jsx.snap +46 -0
- package/src/plugins/toolbar/__tests__/default-toolbar.test.jsx +94 -0
- package/src/plugins/toolbar/__tests__/editor-and-toolbar.test.jsx +37 -0
- package/src/plugins/toolbar/__tests__/toolbar-buttons.test.jsx +51 -0
- package/src/plugins/toolbar/__tests__/toolbar.test.jsx +106 -0
- package/src/plugins/toolbar/default-toolbar.jsx +80 -20
- package/src/plugins/toolbar/done-button.jsx +3 -1
- package/src/plugins/toolbar/editor-and-toolbar.jsx +18 -13
- package/src/plugins/toolbar/toolbar-buttons.jsx +52 -11
- package/src/plugins/toolbar/toolbar.jsx +31 -8
- package/src/serialization.jsx +213 -38
- package/README.md +0 -45
- package/deploy.sh +0 -16
- package/lib/editor.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/parse-html.js.map +0 -1
- package/lib/plugins/characters/custom-popper.js.map +0 -1
- package/lib/plugins/characters/index.js.map +0 -1
- package/lib/plugins/characters/utils.js.map +0 -1
- package/lib/plugins/html/icons/index.js.map +0 -1
- package/lib/plugins/html/index.js.map +0 -1
- package/lib/plugins/image/alt-dialog.js.map +0 -1
- package/lib/plugins/image/component.js.map +0 -1
- package/lib/plugins/image/image-toolbar.js.map +0 -1
- package/lib/plugins/image/index.js.map +0 -1
- package/lib/plugins/image/insert-image-handler.js.map +0 -1
- package/lib/plugins/index.js.map +0 -1
- package/lib/plugins/list/index.js.map +0 -1
- package/lib/plugins/math/index.js.map +0 -1
- package/lib/plugins/media/index.js.map +0 -1
- package/lib/plugins/media/media-dialog.js.map +0 -1
- package/lib/plugins/media/media-toolbar.js.map +0 -1
- package/lib/plugins/media/media-wrapper.js.map +0 -1
- package/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
- package/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
- package/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
- package/lib/plugins/respArea/icons/index.js.map +0 -1
- package/lib/plugins/respArea/index.js.map +0 -1
- package/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
- package/lib/plugins/respArea/utils.js.map +0 -1
- package/lib/plugins/table/icons/index.js.map +0 -1
- package/lib/plugins/table/index.js.map +0 -1
- package/lib/plugins/table/table-toolbar.js.map +0 -1
- package/lib/plugins/toolbar/default-toolbar.js.map +0 -1
- package/lib/plugins/toolbar/done-button.js.map +0 -1
- package/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
- package/lib/plugins/toolbar/index.js.map +0 -1
- package/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
- package/lib/plugins/toolbar/toolbar.js.map +0 -1
- package/lib/plugins/utils.js.map +0 -1
- package/lib/serialization.js.map +0 -1
- package/lib/theme.js.map +0 -1
- package/playground/image/data.js +0 -59
- package/playground/image/index.html +0 -22
- package/playground/image/index.jsx +0 -81
- package/playground/index.html +0 -25
- package/playground/mathquill/index.html +0 -22
- package/playground/mathquill/index.jsx +0 -155
- package/playground/package.json +0 -15
- package/playground/prod-test/index.html +0 -22
- package/playground/prod-test/index.jsx +0 -28
- package/playground/schema-override/data.js +0 -29
- package/playground/schema-override/image-plugin.jsx +0 -41
- package/playground/schema-override/index.html +0 -21
- package/playground/schema-override/index.jsx +0 -97
- package/playground/serialization/data.js +0 -29
- package/playground/serialization/image-plugin.jsx +0 -41
- package/playground/serialization/index.html +0 -22
- package/playground/serialization/index.jsx +0 -12
- package/playground/static.json +0 -3
- package/playground/table-examples.html +0 -70
- package/playground/webpack.config.js +0 -42
- package/static.json +0 -1
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import { Value, Schema } from 'slate';
|
|
4
|
-
import data from './data';
|
|
5
|
-
import { Editor } from 'slate-react';
|
|
6
|
-
import ImgPlugin from './image-plugin';
|
|
7
|
-
|
|
8
|
-
const schema = {
|
|
9
|
-
document: {
|
|
10
|
-
nodes: [
|
|
11
|
-
{
|
|
12
|
-
match: [{ type: 'paragraph' }, { type: 'image' }],
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
blocks: {
|
|
17
|
-
paragraph: {
|
|
18
|
-
nodes: [
|
|
19
|
-
{
|
|
20
|
-
match: [{ type: 'image' }, { object: 'text' }],
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
inlines: {
|
|
26
|
-
image: {
|
|
27
|
-
isVoid: true,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// const raw = new Schema();
|
|
33
|
-
|
|
34
|
-
// raw.rules.push({
|
|
35
|
-
// match: {
|
|
36
|
-
// object: 'block',
|
|
37
|
-
// first: { object: 'block' }
|
|
38
|
-
// },
|
|
39
|
-
// nodes: [
|
|
40
|
-
// {
|
|
41
|
-
// match: { object: 'block' }
|
|
42
|
-
// }
|
|
43
|
-
// ],
|
|
44
|
-
// normalize: error => {
|
|
45
|
-
// console.log('override the defaults! where we force only blocks');
|
|
46
|
-
// }
|
|
47
|
-
// });
|
|
48
|
-
|
|
49
|
-
// raw.rules.push({
|
|
50
|
-
// match: {
|
|
51
|
-
// object: 'block',
|
|
52
|
-
// first: [{ object: 'inline' }, { object: 'text' }]
|
|
53
|
-
// },
|
|
54
|
-
// nodes: [
|
|
55
|
-
// {
|
|
56
|
-
// match: [{ object: 'inline' }, { object: 'text' }]
|
|
57
|
-
// }
|
|
58
|
-
// ],
|
|
59
|
-
// normalize: error => {
|
|
60
|
-
// console.log('override the defaults! where we force only inline/text');
|
|
61
|
-
// }
|
|
62
|
-
// });
|
|
63
|
-
|
|
64
|
-
// const s = Schema.fromJSON(schema);
|
|
65
|
-
// const v = Value.fromJSON(data, { normalize: false });
|
|
66
|
-
// const error = s.validateNode(v.document.nodes.get(0));
|
|
67
|
-
// const rawError = raw.validateNode(v.document.nodes.get(0));
|
|
68
|
-
// console.log('error: ', error, 'rawError', rawError);
|
|
69
|
-
|
|
70
|
-
class App extends React.Component {
|
|
71
|
-
constructor(props) {
|
|
72
|
-
super(props);
|
|
73
|
-
this.state = {
|
|
74
|
-
value: Value.fromJSON(data, { normalize: false }),
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
this.plugins = [ImgPlugin()];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
render() {
|
|
81
|
-
return (
|
|
82
|
-
<Editor
|
|
83
|
-
value={this.state.value}
|
|
84
|
-
plugins={this.plugins}
|
|
85
|
-
schema={schema}
|
|
86
|
-
renderNode={this.renderNode}
|
|
87
|
-
onChange={(change) => this.setState({ value: change.value })}
|
|
88
|
-
/>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
94
|
-
const el = React.createElement(App, {});
|
|
95
|
-
|
|
96
|
-
ReactDOM.render(el, document.querySelector('#app'));
|
|
97
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
document: {
|
|
3
|
-
nodes: [
|
|
4
|
-
{
|
|
5
|
-
object: 'block',
|
|
6
|
-
type: 'paragraph',
|
|
7
|
-
nodes: [
|
|
8
|
-
{
|
|
9
|
-
object: 'inline',
|
|
10
|
-
type: 'image',
|
|
11
|
-
isVoid: true,
|
|
12
|
-
data: {
|
|
13
|
-
src:
|
|
14
|
-
'https://img.washingtonpost.com/wp-apps/imrs.php?src=https://img.washingtonpost.com/news/speaking-of-science/wp-content/uploads/sites/36/2015/10/as12-49-7278-1024x1024.jpg&w=1484',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
object: 'text',
|
|
19
|
-
leaves: [
|
|
20
|
-
{
|
|
21
|
-
text: 'hi',
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Block, Range } from 'slate';
|
|
3
|
-
|
|
4
|
-
class Img extends React.Component {
|
|
5
|
-
render() {
|
|
6
|
-
const { data } = this.props.node;
|
|
7
|
-
const src = data.get('src');
|
|
8
|
-
|
|
9
|
-
return <img src={src} width={100} />;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const ImgPlugin = () => {
|
|
14
|
-
return {
|
|
15
|
-
renderNode: (props) => {
|
|
16
|
-
if (props.node.type === 'image') {
|
|
17
|
-
return <Img {...props} />;
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
onKeyDown(event, change, editor) {
|
|
21
|
-
const { startKey } = change.value.selection;
|
|
22
|
-
const n = change.value.document.getDescendant(startKey);
|
|
23
|
-
const p = change.value.document.getParent(n.key);
|
|
24
|
-
|
|
25
|
-
if (p.type === 'image') {
|
|
26
|
-
const block = Block.fromJSON({ type: 'div' });
|
|
27
|
-
const range = Range.fromJSON({
|
|
28
|
-
anchorKey: block.key,
|
|
29
|
-
anchorOffset: 0,
|
|
30
|
-
focusKey: block.key,
|
|
31
|
-
focusOffset: 0,
|
|
32
|
-
isFocused: true,
|
|
33
|
-
isBackward: false,
|
|
34
|
-
});
|
|
35
|
-
change.insertBlockAtRange(change.value.selection, block).select(range);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default ImgPlugin;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
|
|
5
|
-
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
|
|
6
|
-
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom-server.browser.production.min.js"></script>
|
|
7
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" />
|
|
8
|
-
<style>
|
|
9
|
-
body,
|
|
10
|
-
span,
|
|
11
|
-
div,
|
|
12
|
-
p {
|
|
13
|
-
font-family: 'Roboto', sans-serif;
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
16
|
-
<script src="bundle.js" type="text/javascript"></script>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div id="app"></div>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
package/playground/static.json
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<table class="tblmargin" border="2">
|
|
2
|
-
<tbody>
|
|
3
|
-
<tr>
|
|
4
|
-
<th class="tabpadding" colspan="2">Selena's Input/Output Table</th>
|
|
5
|
-
</tr>
|
|
6
|
-
<tr>
|
|
7
|
-
<th class="tabpadding">
|
|
8
|
-
time in minutes since beginning of train ride ( <span class="mf-mc-pml-pie">$x$</span>)
|
|
9
|
-
</th>
|
|
10
|
-
<th class="tabpadding">
|
|
11
|
-
distance in miles between Selena's and her grandmother's house ( <span class="mf-mc-pml-pie">$y$</span>)
|
|
12
|
-
</th>
|
|
13
|
-
</tr>
|
|
14
|
-
<tr>
|
|
15
|
-
<td class="numbersCenter">5</td>
|
|
16
|
-
<td class="numbersCenter">24</td>
|
|
17
|
-
</tr>
|
|
18
|
-
<tr>
|
|
19
|
-
<td class="numbersCenter">10</td>
|
|
20
|
-
<td class="numbersCenter">21</td>
|
|
21
|
-
</tr>
|
|
22
|
-
<tr>
|
|
23
|
-
<td class="numbersCenter">15</td>
|
|
24
|
-
<td class="numbersCenter">18</td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<td class="numbersCenter">20</td>
|
|
28
|
-
<td class="numbersCenter">15</td>
|
|
29
|
-
</tr>
|
|
30
|
-
</tbody>
|
|
31
|
-
</table>
|
|
32
|
-
|
|
33
|
-
<table class="tblmargin" border="2">
|
|
34
|
-
<tr>
|
|
35
|
-
<td class="numbersCenter">5</td>
|
|
36
|
-
<td class="numbersCenter">24</td>
|
|
37
|
-
</tr>
|
|
38
|
-
<tr>
|
|
39
|
-
<td class="numbersCenter">10</td>
|
|
40
|
-
<td class="numbersCenter">21</td>
|
|
41
|
-
</tr>
|
|
42
|
-
<tr>
|
|
43
|
-
<td class="numbersCenter">15</td>
|
|
44
|
-
<td class="numbersCenter">18</td>
|
|
45
|
-
</tr>
|
|
46
|
-
<tr>
|
|
47
|
-
<td class="numbersCenter">20</td>
|
|
48
|
-
<td class="numbersCenter">15</td>
|
|
49
|
-
</tr>
|
|
50
|
-
</table>
|
|
51
|
-
|
|
52
|
-
<table border="1">
|
|
53
|
-
<tr>
|
|
54
|
-
<td>hi</td>
|
|
55
|
-
</tr>
|
|
56
|
-
</table>
|
|
57
|
-
|
|
58
|
-
<table>
|
|
59
|
-
<tr>
|
|
60
|
-
<td>foo</td>
|
|
61
|
-
</tr>
|
|
62
|
-
</table>
|
|
63
|
-
|
|
64
|
-
<table>
|
|
65
|
-
<tbody>
|
|
66
|
-
<tr>
|
|
67
|
-
<td>foo</td>
|
|
68
|
-
</tr>
|
|
69
|
-
</tbody>
|
|
70
|
-
</table>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// const DashboardPlugin = require('webpack-dashboard/plugin');
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
mode: 'development',
|
|
5
|
-
devtool: 'eval-source-map',
|
|
6
|
-
context: __dirname,
|
|
7
|
-
entry: {
|
|
8
|
-
image: './image/index.jsx',
|
|
9
|
-
'schema-override': './schema-override/index.jsx',
|
|
10
|
-
'prod-test': './prod-test/index.jsx',
|
|
11
|
-
mathquill: './mathquill/index.jsx',
|
|
12
|
-
serialization: './serialization/index.jsx',
|
|
13
|
-
},
|
|
14
|
-
output: {
|
|
15
|
-
filename: '[name]/bundle.js',
|
|
16
|
-
path: __dirname,
|
|
17
|
-
},
|
|
18
|
-
module: {
|
|
19
|
-
rules: [
|
|
20
|
-
{
|
|
21
|
-
test: /\.css$/,
|
|
22
|
-
loader: 'url-loader',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
test: /\.jsx$/,
|
|
26
|
-
loader: 'babel-loader',
|
|
27
|
-
options: {
|
|
28
|
-
babelrc: false,
|
|
29
|
-
presets: ['react', 'env', 'stage-0'],
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
resolve: {
|
|
35
|
-
extensions: ['.js', '.jsx'],
|
|
36
|
-
},
|
|
37
|
-
externals: {
|
|
38
|
-
react: 'React',
|
|
39
|
-
'react-dom': 'ReactDOM',
|
|
40
|
-
'react-dom/server': 'ReactDOMServer',
|
|
41
|
-
},
|
|
42
|
-
};
|
package/static.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|