@fast-crud/editor-markdown 1.28.3 → 1.28.5
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/.eslintrc.js +63 -3
- package/.prettierrc +1 -0
- package/CHANGELOG.md +4 -0
- package/dist/d/editor/exports.d.ts +1 -0
- package/dist/d/editor/index.d.ts +4 -0
- package/dist/d/editor/index.umd.d.ts +1 -0
- package/dist/d/editor/type/index.d.ts +4 -0
- package/dist/d/editor/type/types.d.ts +12 -0
- package/dist/d/index.d.ts +2 -0
- package/dist/d/index.umd.d.ts +2 -0
- package/dist/editor-markdown.mjs +6 -54
- package/dist/editor-markdown.mjs.map +1 -0
- package/dist/editor-markdown.umd.js +2 -1
- package/dist/editor-markdown.umd.js.map +1 -0
- package/dist/index-041be0e7.mjs +8 -0
- package/dist/index-041be0e7.mjs.map +1 -0
- package/dist/index-4f72a34c.mjs +64 -0
- package/dist/index-4f72a34c.mjs.map +1 -0
- package/package.json +48 -5
- package/src/editor/components/fs-editor-markdown/index.vue +49 -0
- package/src/editor/exports.ts +1 -0
- package/src/editor/index.umd.ts +1 -0
- package/src/editor/type/types.ts +7 -0
- package/src/index.umd.ts +3 -0
- package/src/style.css +1 -0
- package/stats.html +4949 -0
- package/tsconfig.json +36 -4
- package/vite.config.js +99 -18
- package/dist/index-0ae09bdb.mjs +0 -7
package/tsconfig.json
CHANGED
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
3
4
|
"noImplicitAny": false,
|
|
4
5
|
"target": "esnext",
|
|
5
6
|
"module": "esnext",
|
|
6
7
|
"strict": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"jsxImportSource": "vue",
|
|
10
|
+
"verbatimModuleSyntax":false ,
|
|
11
|
+
"importHelpers": true,
|
|
7
12
|
"moduleResolution": "node",
|
|
13
|
+
"experimentalDecorators": true,
|
|
8
14
|
"skipLibCheck": true,
|
|
9
15
|
"esModuleInterop": true,
|
|
10
16
|
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"strictNullChecks" :false,
|
|
11
18
|
"sourceMap": true,
|
|
12
|
-
"
|
|
13
|
-
"
|
|
19
|
+
"baseUrl": ".",
|
|
20
|
+
"outDir": "./dist/ts",
|
|
21
|
+
"types": [
|
|
22
|
+
"vite/client",
|
|
23
|
+
"mocha",
|
|
24
|
+
"chai",
|
|
25
|
+
"unplugin-vue-define-options/macros-global"
|
|
26
|
+
],
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": [
|
|
29
|
+
"src/*"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"lib": [
|
|
33
|
+
"esnext",
|
|
34
|
+
"dom",
|
|
35
|
+
"dom.iterable",
|
|
36
|
+
"scripthost"
|
|
37
|
+
]
|
|
14
38
|
},
|
|
15
|
-
"include": [
|
|
16
|
-
|
|
39
|
+
"include": [
|
|
40
|
+
"src/**/*.ts",
|
|
41
|
+
"src/**/*.tsx",
|
|
42
|
+
"src/**/*.vue",
|
|
43
|
+
"tests/**/*.ts",
|
|
44
|
+
"tests/**/*.tsx"
|
|
45
|
+
],
|
|
46
|
+
"exclude": [
|
|
47
|
+
"node_modules"
|
|
48
|
+
]
|
|
17
49
|
}
|
package/vite.config.js
CHANGED
|
@@ -1,26 +1,107 @@
|
|
|
1
1
|
import vue from "@vitejs/plugin-vue";
|
|
2
|
+
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
2
3
|
import path from "path";
|
|
3
|
-
|
|
4
|
+
import { visualizer } from "rollup-plugin-visualizer";
|
|
5
|
+
import strip from "@rollup/plugin-strip";
|
|
6
|
+
import DefineOptions from "unplugin-vue-define-options/vite";
|
|
7
|
+
import typescript from "@rollup/plugin-typescript";
|
|
8
|
+
import _ from "lodash";
|
|
4
9
|
const { resolve } = path;
|
|
10
|
+
// https://vitejs.dev/config/
|
|
11
|
+
export default ({ command, mode }) => {
|
|
12
|
+
let build = {};
|
|
13
|
+
if (mode === "umd") {
|
|
14
|
+
build = {
|
|
15
|
+
build: {
|
|
16
|
+
emptyOutDir: true,
|
|
17
|
+
lib: {
|
|
18
|
+
entry: resolve(__dirname, "src/index.umd.ts"),
|
|
19
|
+
formats: ["umd"]
|
|
20
|
+
},
|
|
21
|
+
rollupOptions: {
|
|
22
|
+
output: {
|
|
23
|
+
manualChunks: null
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
5
29
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
30
|
+
const options = {
|
|
31
|
+
base: "./",
|
|
32
|
+
plugins: [DefineOptions(), vueJsx(), vue()],
|
|
33
|
+
esbuild: {
|
|
34
|
+
drop: command === "build" ? ["debugger"] : [],
|
|
35
|
+
jsxFactory: "h",
|
|
36
|
+
jsxFragment: "Fragment",
|
|
37
|
+
pure: ["console.log", "debugger"]
|
|
14
38
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
39
|
+
build: {
|
|
40
|
+
emptyOutDir: false,
|
|
41
|
+
lib: {
|
|
42
|
+
entry: resolve(__dirname, "src/index.ts"),
|
|
43
|
+
name: "FsExtends",
|
|
44
|
+
formats: ["es"]
|
|
45
|
+
},
|
|
46
|
+
// cssCodeSplit: true,
|
|
47
|
+
sourcemap: true,
|
|
48
|
+
// minify: false,
|
|
49
|
+
rollupOptions: {
|
|
50
|
+
plugins: [
|
|
51
|
+
strip(),
|
|
52
|
+
visualizer(),
|
|
53
|
+
typescript({
|
|
54
|
+
target: "es2020",
|
|
55
|
+
rootDir: "src",
|
|
56
|
+
declaration: true,
|
|
57
|
+
declarationDir: "dist/d",
|
|
58
|
+
exclude: "./node_modules/**",
|
|
59
|
+
allowSyntheticDefaultImports: true
|
|
60
|
+
})
|
|
61
|
+
],
|
|
62
|
+
// make sure to externalize deps that shouldn't be bundled
|
|
63
|
+
// into your library
|
|
64
|
+
external: [
|
|
65
|
+
"vue",
|
|
66
|
+
"lodash-es",
|
|
67
|
+
"dayjs",
|
|
68
|
+
"vue-i18n",
|
|
69
|
+
"vuedraggable",
|
|
70
|
+
"axios",
|
|
71
|
+
"qiniu-js",
|
|
72
|
+
"@fast-crud/fast-crud",
|
|
73
|
+
"@fast-crud/ui-interface",
|
|
74
|
+
"mavon-editor"
|
|
75
|
+
],
|
|
76
|
+
output: {
|
|
77
|
+
manualChunks(id) {
|
|
78
|
+
if (id.includes("src/components") && id.lastIndexOf(".vue") > 0) {
|
|
79
|
+
let name = id.substring(id.lastIndexOf("/") + 1);
|
|
80
|
+
name = name.substring(0, name.indexOf("."));
|
|
81
|
+
return "components/" + name;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
// Provide global variables to use in the UMD build
|
|
85
|
+
// for externalized deps
|
|
86
|
+
globals: {
|
|
87
|
+
vue: "Vue",
|
|
88
|
+
"lodash-es": "_",
|
|
89
|
+
dayjs: "dayjs",
|
|
90
|
+
"vue-i18n": "VueI18n",
|
|
91
|
+
axios: "axios",
|
|
92
|
+
vuedraggable: "vuedraggable",
|
|
93
|
+
"@fast-crud/fast-crud": "FastCrud",
|
|
94
|
+
"ali-oss": "OSS",
|
|
95
|
+
"cos-js-sdk-v5": "COS",
|
|
96
|
+
"qiniu-js": "qiniu",
|
|
97
|
+
"@fast-crud/ui-interface": "FsUiInterface",
|
|
98
|
+
"mavon-editor": "MavonEditor"
|
|
99
|
+
}
|
|
22
100
|
}
|
|
23
101
|
}
|
|
24
102
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
_.merge(options, build);
|
|
106
|
+
return options;
|
|
107
|
+
};
|