@umoteam/editor-external 3.1.2 → 4.1.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/build.js +4 -2
- package/libs/mammoth/mammoth.browser.min.js +21 -0
- package/package.json +3 -4
- package/libs/paged.polyfill.min.js +0 -4
- package/libs/umo-editor/style.css +0 -1
- package/libs/umo-editor/umo-editor.mjs +0 -46464
package/build.js
CHANGED
|
@@ -35,10 +35,9 @@ const copyDir = (sourcePath, targetPath) => {
|
|
|
35
35
|
// 定义要复制的文件和目录列表
|
|
36
36
|
const files = [
|
|
37
37
|
{ from: 'imgly/background-removal-data', to: 'imgly/background-removal-data', npm: false },
|
|
38
|
-
{ from: '@umoteam/editor/dist', to: 'umo-editor' },
|
|
39
38
|
{ from: 'monaco-editor/min', to: 'monaco-editor/min' },
|
|
40
39
|
{ from: 'katex/dist', to: 'katex' },
|
|
41
|
-
{ from: '
|
|
40
|
+
{ from: 'mammoth/mammoth.browser.min.js', to: 'mammoth/mammoth.browser.min.js' }
|
|
42
41
|
];
|
|
43
42
|
|
|
44
43
|
// 循环遍历每个要复制的文件或目录
|
|
@@ -48,6 +47,9 @@ files.forEach((item) => {
|
|
|
48
47
|
|
|
49
48
|
// 如果是文件,使用fs.copyFileSync
|
|
50
49
|
if (fs.existsSync(sourcePath) && fs.statSync(sourcePath).isFile()) {
|
|
50
|
+
if (!fs.existsSync(targetPath)) {
|
|
51
|
+
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
|
|
52
|
+
}
|
|
51
53
|
fs.copyFileSync(sourcePath, targetPath);
|
|
52
54
|
console.log(`Copied file: ${sourcePath} to ${targetPath}`);
|
|
53
55
|
}
|