@seafile/seafile-editor 0.3.99 → 0.3.100
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/dist/_i18n/index.js +20 -0
- package/dist/assets/css/comment-dialog.css +50 -0
- package/dist/{css → assets/css}/diff-viewer.css +0 -0
- package/dist/{css/richeditor → assets/css}/formula.css +0 -0
- package/dist/{css → assets/css}/history-viewer.css +0 -0
- package/dist/{css/richeditor → assets/css}/image.css +0 -0
- package/dist/{index.css → assets/css/index.css} +0 -0
- package/dist/assets/css/issue-card.css +43 -0
- package/dist/{css → assets/css}/keyboard-shortcuts.css +0 -0
- package/dist/{css/richeditor → assets/css}/link.css +0 -0
- package/dist/{css/plaineditor → assets/css}/markdown-editor.css +0 -0
- package/dist/{css → assets/css}/markdown-viewer.css +0 -0
- package/dist/{css/richeditor → assets/css}/navbar-imgbutton.css +0 -0
- package/dist/assets/css/outline.css +29 -0
- package/dist/{css/richeditor → assets/css}/table.css +0 -0
- package/dist/{css/richeditor → assets/css}/textlink-hovermenu.css +0 -0
- package/dist/{css → assets/css}/topbar.css +19 -33
- package/dist/{css/richeditor → assets/css}/tree-view.css +0 -0
- package/dist/{css/richeditor/right-panel.css → assets/css/user-help.css} +9 -9
- package/dist/assets/editor/plain-editor.css +30 -0
- package/dist/assets/editor/rich-editor.css +104 -0
- package/dist/assets/editor/simple-editor.css +77 -0
- package/dist/{css/richeditor → assets/rich-editor}/document-info.css +0 -0
- package/dist/components/add-formula-dialog.js +6 -4
- package/dist/components/add-image-dialog.js +3 -1
- package/dist/components/add-link-dialog.js +4 -3
- package/dist/components/comment-dialog.js +12 -6
- package/dist/components/markdown-lint.js +1 -0
- package/dist/components/outline/index.js +97 -0
- package/dist/components/outline/outline-item.js +70 -0
- package/dist/components/shortcut-dialog.js +1 -1
- package/dist/components/{topbar-component → toolbar}/header-list.js +0 -0
- package/dist/components/toolbar/help-group.js +40 -0
- package/dist/components/toolbar/index.js +4 -0
- package/dist/components/{topbar-component/upload-img.js → toolbar/insert-image.js} +18 -15
- package/dist/components/toolbar/insert-table.js +155 -0
- package/dist/components/toolbar/table-group.js +82 -0
- package/dist/components/{toolbar.js → toolbar/toolbar.js} +102 -64
- package/dist/components/{topbar-component → toolbar/widgets}/button-group.js +0 -0
- package/dist/components/toolbar/widgets/button-item.js +144 -0
- package/dist/components/toolbar/widgets/drop-list.js +101 -0
- package/dist/components/user-help.js +16 -10
- package/dist/editor/controller/block-element-controller.js +6 -2
- package/dist/editor/controller/inline-element-controller.js +6 -2
- package/dist/editor/editor-builder.js +107 -0
- package/dist/editor/editor-component/formula.js +4 -2
- package/dist/editor/editor-component/image.js +10 -6
- package/dist/editor/editor-component/table.js +1 -1
- package/dist/editor/editor-plugin.js +3 -1
- package/dist/editor/editor.js +1 -32
- package/dist/editor/index.js +97 -0
- package/dist/editor/markdown-editor.js +323 -0
- package/dist/editor/plain-markdown-editor.js +5 -4
- package/dist/editor/rich-markdown-editor.js +70 -149
- package/dist/editor/simple-editor.js +44 -78
- package/dist/{css/richeditor → example/assets/css}/comments-list.css +0 -45
- package/dist/{css/richeditor → example/assets/css}/detail-list-view.css +0 -0
- package/dist/{css/richeditor → example/assets/css}/participants-list.css +0 -0
- package/dist/{css → example/assets/css}/react-mentions-default-style.js +0 -0
- package/dist/example/assets/css/seafile-editor-main.css +125 -0
- package/dist/example/assets/css/seafile-editor-side.css +89 -0
- package/dist/example/assets/css/side-panel.css +81 -0
- package/dist/{components → example/components}/comment-panel.js +12 -6
- package/dist/{components → example/components}/detail-list-view.js +1 -1
- package/dist/{components → example/components}/participants-list.js +1 -1
- package/dist/{components → example/components}/side-panel.js +5 -7
- package/dist/example/seafile-editor.js +137 -0
- package/dist/index.js +9 -0
- package/dist/index.local.js +58 -0
- package/dist/pages/seafile-editor/index.js +38 -0
- package/dist/{editor → pages/seafile-editor}/seafile-editor.js +19 -35
- package/dist/{seafile-editor-chooser.js → pages/seafile-editor-chooser.js} +0 -0
- package/dist/{seafile-markdown-editor.js → pages/seafile-markdown-editor.js} +5 -5
- package/dist/{seafile-markdown-viewer.js → pages/seafile-markdown-viewer.js} +3 -3
- package/dist/{seafile-simple-editor.js → pages/seafile-simple-editor.js} +5 -2
- package/dist/viewer/diff-viewer.js +1 -1
- package/dist/viewer/markdown-viewer.js +14 -15
- package/dist/viewer/slate-viewer.js +9 -24
- package/dist/viewer/viewer-formula.js +1 -1
- package/package.json +5 -13
- package/dist/components/generate-share-link.js +0 -412
- package/dist/components/internal-link-dialog.js +0 -96
- package/dist/components/outline.js +0 -130
- package/dist/components/topbar-component/icon-button.js +0 -99
- package/dist/components/topbar-component/insert-file.js +0 -67
- package/dist/components/topbar-component/table-toolbar.js +0 -175
- package/dist/css/layout.css +0 -111
- package/dist/css/markdown-viewer-slate/file-tags-list.css +0 -76
- package/dist/css/richeditor/rich-editor-main.css +0 -32
- package/dist/css/richeditor/side-panel.css +0 -183
|
@@ -4,14 +4,13 @@ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitial
|
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import toaster from '../components/toast';
|
|
8
7
|
import { withTranslation } from 'react-i18next';
|
|
9
8
|
import { Text } from 'slate';
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
12
|
-
|
|
13
|
-
import PlainMarkdownEditor from '
|
|
14
|
-
import { serialize, deserialize } from '
|
|
9
|
+
import toaster from '../../components/toast';
|
|
10
|
+
import RichMarkdownEditor from '../../example/seafile-editor'; // import RichMarkdownEditor from '../../editor/rich-markdown-editor';
|
|
11
|
+
|
|
12
|
+
import PlainMarkdownEditor from '../../editor/plain-markdown-editor';
|
|
13
|
+
import { serialize, deserialize } from '../../utils/slate2markdown';
|
|
15
14
|
|
|
16
15
|
var SeafileEditor = /*#__PURE__*/function (_React$Component) {
|
|
17
16
|
_inherits(SeafileEditor, _React$Component);
|
|
@@ -266,53 +265,38 @@ var SeafileEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
266
265
|
}, {
|
|
267
266
|
key: "render",
|
|
268
267
|
value: function render() {
|
|
269
|
-
var dom = '';
|
|
270
|
-
|
|
271
268
|
if (this.props.editorMode === 'rich') {
|
|
272
|
-
|
|
269
|
+
return /*#__PURE__*/React.createElement(RichMarkdownEditor, {
|
|
270
|
+
value: this.state.richValue,
|
|
271
|
+
issues: this.state.issues,
|
|
272
|
+
fileInfo: this.props.fileInfo,
|
|
273
|
+
participants: this.props.participants,
|
|
274
|
+
fileTagList: this.props.fileTagList,
|
|
275
|
+
readOnly: this.props.readOnly,
|
|
273
276
|
editorApi: this.props.editorApi,
|
|
277
|
+
collabUsers: this.props.collabUsers,
|
|
274
278
|
onChange: this.onChange,
|
|
275
279
|
onSave: this.onRichEditorSave,
|
|
276
|
-
value: this.state.richValue,
|
|
277
280
|
resetRichValue: this.resetRichValue,
|
|
278
|
-
contentChanged: this.props.contentChanged,
|
|
279
|
-
saving: this.props.saving,
|
|
280
|
-
switchToMarkDownViewer: this.switchToMarkDownViewer,
|
|
281
|
-
switchToPlainTextEditor: this.switchToPlainTextEditor,
|
|
282
|
-
fileInfo: this.props.fileInfo,
|
|
283
|
-
toggleStar: this.props.toggleStar,
|
|
284
|
-
issues: this.state.issues,
|
|
285
|
-
resetContentChanged: this.resetContentChanged,
|
|
286
|
-
collabUsers: this.props.collabUsers,
|
|
287
|
-
mode: this.props.editorMode,
|
|
288
|
-
draftID: this.props.draftID,
|
|
289
|
-
isDraft: this.props.isDraft,
|
|
290
281
|
openDialogs: this.props.openDialogs,
|
|
291
|
-
readOnly: this.props.readOnly,
|
|
292
|
-
fileTagList: this.props.fileTagList,
|
|
293
|
-
participants: this.props.participants,
|
|
294
282
|
onParticipantsChange: this.props.onParticipantsChange
|
|
295
283
|
});
|
|
296
|
-
}
|
|
297
|
-
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (this.props.editorMode === 'plain') {
|
|
287
|
+
return /*#__PURE__*/React.createElement(PlainMarkdownEditor, {
|
|
298
288
|
editorApi: this.props.editorApi,
|
|
299
289
|
initialValue: this.state.initialPlainValue,
|
|
300
290
|
currentContent: this.state.currentContent,
|
|
301
291
|
contentChanged: this.props.contentChanged,
|
|
302
|
-
switchToRichTextEditor: this.switchToRichTextEditor,
|
|
303
|
-
switchToMarkDownViewer: this.switchToMarkDownViewer,
|
|
304
292
|
onSave: this.onPlainEditorSave,
|
|
305
293
|
onChange: this.onChange,
|
|
306
294
|
fileInfo: this.props.fileInfo,
|
|
307
|
-
|
|
308
|
-
collabUsers: this.props.collabUsers,
|
|
309
|
-
mode: this.props.editorMode,
|
|
310
|
-
draftID: this.props.draftID,
|
|
311
|
-
isDraft: this.props.isDraft
|
|
295
|
+
collabUsers: this.props.collabUsers
|
|
312
296
|
});
|
|
313
297
|
}
|
|
314
298
|
|
|
315
|
-
return
|
|
299
|
+
return null;
|
|
316
300
|
}
|
|
317
301
|
}]);
|
|
318
302
|
|
|
File without changes
|
|
@@ -5,12 +5,12 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
6
|
// Import React!
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { SeafileEditor } from './editor/editor';
|
|
9
8
|
import { withTranslation } from 'react-i18next';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import editorApi from '
|
|
9
|
+
import { serialize } from '../utils/slate2markdown';
|
|
10
|
+
import Loading from '../components/loading';
|
|
11
|
+
import SeafileEditor from './seafile-editor';
|
|
12
|
+
import editorApi from '../editor-api';
|
|
13
|
+
import { serverConfig } from '../config';
|
|
14
14
|
var repoID = serverConfig.repoID,
|
|
15
15
|
userInfo = serverConfig.userInfo,
|
|
16
16
|
filePath = serverConfig.filePath,
|
|
@@ -3,9 +3,9 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import
|
|
7
|
-
import editorApi from '
|
|
8
|
-
import
|
|
6
|
+
import MarkdownViewer from '../viewer/markdown-viewer';
|
|
7
|
+
import editorApi from '../editor-api';
|
|
8
|
+
import { serverConfig } from '../config';
|
|
9
9
|
var repoID = serverConfig.repoID,
|
|
10
10
|
filePath = serverConfig.filePath;
|
|
11
11
|
|
|
@@ -4,8 +4,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { withTranslation } from 'react-i18next';
|
|
7
|
-
import { SimpleEditor } from '
|
|
8
|
-
import editorApi from '
|
|
7
|
+
import { SimpleEditor } from '../editor/editor';
|
|
8
|
+
import editorApi from '../editor-api';
|
|
9
9
|
|
|
10
10
|
var SFSimpleMdEditor = /*#__PURE__*/function (_React$Component) {
|
|
11
11
|
_inherits(SFSimpleMdEditor, _React$Component);
|
|
@@ -30,6 +30,8 @@ var SFSimpleMdEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
30
30
|
_this.editor = editor;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
_this.onSave = function () {};
|
|
34
|
+
|
|
33
35
|
return _this;
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -44,6 +46,7 @@ var SFSimpleMdEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
44
46
|
return /*#__PURE__*/React.createElement(SimpleEditor, {
|
|
45
47
|
onRef: this.onRef,
|
|
46
48
|
editorApi: editorApi,
|
|
49
|
+
onSave: this.onSave,
|
|
47
50
|
value: this.state.value,
|
|
48
51
|
focusEnd: true
|
|
49
52
|
});
|
|
@@ -7,7 +7,7 @@ import { SlateDiff } from '../utils/diff';
|
|
|
7
7
|
import { renderNode, renderLeaf } from '../utils/render-slate';
|
|
8
8
|
import SlateViewer from '../viewer/slate-viewer';
|
|
9
9
|
import LoadScript from '../editor/load-script';
|
|
10
|
-
import '../css/diff-viewer.css';
|
|
10
|
+
import '../assets/css/diff-viewer.css';
|
|
11
11
|
|
|
12
12
|
var DiffViewer = /*#__PURE__*/function (_React$PureComponent) {
|
|
13
13
|
_inherits(DiffViewer, _React$PureComponent);
|
|
@@ -7,7 +7,7 @@ import { deserialize } from '../utils/slate2markdown';
|
|
|
7
7
|
import OutlineView from '../components/outline';
|
|
8
8
|
import SlateViewer from './slate-viewer';
|
|
9
9
|
import LoadScript from '../editor/load-script';
|
|
10
|
-
import '../css/markdown-viewer.css';
|
|
10
|
+
import '../assets/css/markdown-viewer.css';
|
|
11
11
|
|
|
12
12
|
var URL = require('url-parse');
|
|
13
13
|
|
|
@@ -96,7 +96,8 @@ var MarkdownViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
96
96
|
if (!value) return null;
|
|
97
97
|
var _this$props = this.props,
|
|
98
98
|
scriptSource = _this$props.scriptSource,
|
|
99
|
-
showTOC = _this$props.showTOC
|
|
99
|
+
showTOC = _this$props.showTOC,
|
|
100
|
+
activeTitleIndex = _this$props.activeTitleIndex;
|
|
100
101
|
|
|
101
102
|
if (scriptSource) {
|
|
102
103
|
return /*#__PURE__*/React.createElement(LoadScript, {
|
|
@@ -108,21 +109,19 @@ var MarkdownViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
108
109
|
}, /*#__PURE__*/React.createElement(OutlineView, {
|
|
109
110
|
document: value,
|
|
110
111
|
isViewer: true,
|
|
111
|
-
|
|
112
|
-
activeTitleIndex: this.props.activeTitleIndex
|
|
113
|
-
})));
|
|
114
|
-
} else {
|
|
115
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SlateViewer, {
|
|
116
|
-
value: value
|
|
117
|
-
}), showTOC && /*#__PURE__*/React.createElement("div", {
|
|
118
|
-
className: "seafile-markdown-outline"
|
|
119
|
-
}, /*#__PURE__*/React.createElement(OutlineView, {
|
|
120
|
-
document: value,
|
|
121
|
-
isViewer: true,
|
|
122
|
-
editor: this,
|
|
123
|
-
activeTitleIndex: this.props.activeTitleIndex
|
|
112
|
+
activeTitleIndex: activeTitleIndex
|
|
124
113
|
})));
|
|
125
114
|
}
|
|
115
|
+
|
|
116
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SlateViewer, {
|
|
117
|
+
value: value
|
|
118
|
+
}), showTOC && /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: "seafile-markdown-outline"
|
|
120
|
+
}, /*#__PURE__*/React.createElement(OutlineView, {
|
|
121
|
+
document: value,
|
|
122
|
+
isViewer: true,
|
|
123
|
+
activeTitleIndex: activeTitleIndex
|
|
124
|
+
})));
|
|
126
125
|
}
|
|
127
126
|
}]);
|
|
128
127
|
|
|
@@ -3,31 +3,11 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { Editable, Slate } from '@seafile/slate-react';
|
|
6
7
|
import { decorationNode } from '../editor/editor-utils/common-editor-utils';
|
|
7
|
-
import { Editable, withReact, Slate } from '@seafile/slate-react';
|
|
8
|
-
import '../editor/code-highlight-package';
|
|
9
|
-
import { createEditor } from 'slate';
|
|
10
8
|
import { renderNode, renderLeaf } from '../utils/render-slate';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var isVoid = editor.isVoid;
|
|
14
|
-
|
|
15
|
-
editor.isVoid = function (element) {
|
|
16
|
-
return element.type === 'image' || element.type === 'formula' ? true : isVoid(element);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
return editor;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
var withInline = function withInline(editor) {
|
|
23
|
-
var isInline = editor.isInline;
|
|
24
|
-
|
|
25
|
-
editor.isInline = function (element) {
|
|
26
|
-
return element.type === 'link' || element.type === 'image' ? true : isInline(element);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return editor;
|
|
30
|
-
};
|
|
9
|
+
import EditorBuilder from '../editor/editor-builder';
|
|
10
|
+
import '../editor/code-highlight-package';
|
|
31
11
|
|
|
32
12
|
var SlateViewer = /*#__PURE__*/function (_React$Component) {
|
|
33
13
|
_inherits(SlateViewer, _React$Component);
|
|
@@ -40,12 +20,17 @@ var SlateViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
40
20
|
_classCallCheck(this, SlateViewer);
|
|
41
21
|
|
|
42
22
|
_this = _super.call(this, props);
|
|
43
|
-
_this.editor =
|
|
23
|
+
_this.editor = EditorBuilder.getSlateEditor();
|
|
44
24
|
window.viewer = _this.editor;
|
|
45
25
|
return _this;
|
|
46
26
|
}
|
|
47
27
|
|
|
48
28
|
_createClass(SlateViewer, [{
|
|
29
|
+
key: "componentWillUnmount",
|
|
30
|
+
value: function componentWillUnmount() {
|
|
31
|
+
EditorBuilder.resetEditor();
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
49
34
|
key: "render",
|
|
50
35
|
value: function render() {
|
|
51
36
|
var _this$props = this.props,
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import '../css/
|
|
6
|
+
import '../assets/css/formula.css';
|
|
7
7
|
|
|
8
8
|
var ViewerFormula = /*#__PURE__*/function (_React$Component) {
|
|
9
9
|
_inherits(ViewerFormula, _React$Component);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/seafile-editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.100",
|
|
4
4
|
"private": false,
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "^0.0.9",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"deepmerge": "^2.1.0",
|
|
13
13
|
"detect-indent": "^4.0.0",
|
|
14
14
|
"detect-newline": "^2.1.0",
|
|
15
|
-
"ends-with": "^0.2.0",
|
|
16
15
|
"glamor": "^2.20.40",
|
|
17
16
|
"hast-util-sanitize": "^1.1.2",
|
|
18
17
|
"i18next": "^17.0.13",
|
|
@@ -21,15 +20,14 @@
|
|
|
21
20
|
"is-data-uri": "^0.1.0",
|
|
22
21
|
"is-hotkey": "^0.1.3",
|
|
23
22
|
"is-url": "^1.2.4",
|
|
24
|
-
"jszip": "^3.2.1",
|
|
25
23
|
"lodash": "4.17.21",
|
|
26
24
|
"mdast-util-definitions": "^1.2.2",
|
|
27
25
|
"object-assign": "4.1.1",
|
|
28
26
|
"prismjs": "1.23.0",
|
|
29
27
|
"promise": "8.0.1",
|
|
30
28
|
"prop-types": "^15.6.1",
|
|
31
|
-
"react": "^16.
|
|
32
|
-
"react-dom": "^16.
|
|
29
|
+
"react": "^16.12.0",
|
|
30
|
+
"react-dom": "^16.12.0",
|
|
33
31
|
"react-i18next": "^10.12.2",
|
|
34
32
|
"react-mentions": "^3.0.2",
|
|
35
33
|
"react-select": "^2.4.2",
|
|
@@ -44,7 +42,6 @@
|
|
|
44
42
|
"remark-parse": "^5.0.0",
|
|
45
43
|
"remark-rehype": "^3.0.0",
|
|
46
44
|
"remark-slug": "^5.0.0",
|
|
47
|
-
"request": "^2.88.0",
|
|
48
45
|
"seafile-js": "0.2.168",
|
|
49
46
|
"seafile-ui": "^0.1.10",
|
|
50
47
|
"slate": "^0.54.2",
|
|
@@ -61,7 +58,7 @@
|
|
|
61
58
|
"start": "node scripts/start.js",
|
|
62
59
|
"build": "node scripts/build.js",
|
|
63
60
|
"pub:dist": "export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir dist --copy-files",
|
|
64
|
-
"pub:optimized": "rm dist/config.js
|
|
61
|
+
"pub:optimized": "rm dist/config.js",
|
|
65
62
|
"prepublishOnly": "npm run clean && npm run pub:dist && npm run pub:optimized",
|
|
66
63
|
"test": "node scripts/test.js --env=jsdom"
|
|
67
64
|
},
|
|
@@ -112,9 +109,6 @@
|
|
|
112
109
|
"@babel/plugin-proposal-object-rest-spread"
|
|
113
110
|
]
|
|
114
111
|
},
|
|
115
|
-
"eslintConfig": {
|
|
116
|
-
"extends": "react-app"
|
|
117
|
-
},
|
|
118
112
|
"files": [
|
|
119
113
|
"dist/",
|
|
120
114
|
"public/",
|
|
@@ -172,10 +166,8 @@
|
|
|
172
166
|
"postcss-preset-env": "6.7.0",
|
|
173
167
|
"postcss-safe-parser": "4.0.1",
|
|
174
168
|
"raf": "3.4.0",
|
|
175
|
-
"react": "^16.12.0",
|
|
176
169
|
"react-app-polyfill": "^1.0.4",
|
|
177
170
|
"react-dev-utils": "^9.1.0",
|
|
178
|
-
"react-dom": "^16.12.0",
|
|
179
171
|
"resolve": "1.12.0",
|
|
180
172
|
"resolve-url-loader": "3.1.2",
|
|
181
173
|
"sass-loader": "7.2.0",
|
|
@@ -190,7 +182,7 @@
|
|
|
190
182
|
"workbox-webpack-plugin": "4.3.1"
|
|
191
183
|
},
|
|
192
184
|
"description": "This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).",
|
|
193
|
-
"main": "dist/
|
|
185
|
+
"main": "dist/index.js",
|
|
194
186
|
"repository": {
|
|
195
187
|
"type": "git",
|
|
196
188
|
"url": "git+https://github.com/seafileltd/seafile-editor.git"
|