@opentiny/vue-docs 3.18.2 → 3.18.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@opentiny/vue-repl": "^1.1.2",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"vue": "^3.4.31",
|
|
17
17
|
"vue-i18n": "^9.1.10",
|
|
18
18
|
"vue-router": "4.1.5",
|
|
19
|
-
"@opentiny/vue
|
|
19
|
+
"@opentiny/vue": "~3.18.0",
|
|
20
20
|
"@opentiny/vue-design-saas": "~3.18.0",
|
|
21
21
|
"@opentiny/vue-common": "~3.18.0",
|
|
22
|
-
"@opentiny/vue-design-aurora": "~3.18.0",
|
|
23
22
|
"@opentiny/vue-directive": "~3.18.0",
|
|
24
|
-
"@opentiny/vue": "~3.18.0",
|
|
25
23
|
"@opentiny/vue-icon": "~3.18.0",
|
|
24
|
+
"@opentiny/vue-design-aurora": "~3.18.0",
|
|
26
25
|
"@opentiny/vue-icon-saas": "~3.18.0",
|
|
27
|
-
"@opentiny/vue-
|
|
26
|
+
"@opentiny/vue-design-smb": "~3.18.0",
|
|
28
27
|
"@opentiny/vue-theme-mobile": "~3.18.0",
|
|
28
|
+
"@opentiny/vue-theme": "~3.18.1",
|
|
29
29
|
"@opentiny/vue-theme-saas": "~3.18.0",
|
|
30
30
|
"@opentiny/vue-vite-import": "~1.2.0"
|
|
31
31
|
},
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@vue/compiler-sfc": "^3.2.37",
|
|
40
40
|
"chalk": "4.1.2",
|
|
41
41
|
"cross-spawn": "^7.0.3",
|
|
42
|
+
"fast-glob": "^3.2.12",
|
|
42
43
|
"fs-extra": "^10.1.0",
|
|
43
44
|
"less": "^4.1.3",
|
|
44
45
|
"markdown-it": "^13.0.1",
|
package/vite.config.ts
CHANGED
|
@@ -13,6 +13,30 @@ import vue3SvgPlugin from 'vite-svg-loader'
|
|
|
13
13
|
import { getAlias, pathFromWorkspaceRoot, getOptimizeDeps } from '../../internals/cli/src/config/vite'
|
|
14
14
|
import virtualTemplatePlugin from '@opentiny-internal/unplugin-virtual-template/vite'
|
|
15
15
|
import tailwindCss from 'tailwindcss'
|
|
16
|
+
import fg from 'fast-glob'
|
|
17
|
+
import fs from 'fs-extra'
|
|
18
|
+
|
|
19
|
+
const delStatic = () => {
|
|
20
|
+
let config
|
|
21
|
+
return {
|
|
22
|
+
name: 'inline-plugin-del-static',
|
|
23
|
+
apply: 'build',
|
|
24
|
+
configResolved(_config) {
|
|
25
|
+
config = _config
|
|
26
|
+
},
|
|
27
|
+
async closeBundle() {
|
|
28
|
+
const targetPath = path.join(config.build.outDir, '@demos')
|
|
29
|
+
const files = await fg(['**/*.spec.js', '**/*.spec.ts'], {
|
|
30
|
+
dot: true,
|
|
31
|
+
cwd: targetPath
|
|
32
|
+
})
|
|
33
|
+
files.forEach((filename) => {
|
|
34
|
+
const filePath = path.join(targetPath, filename)
|
|
35
|
+
fs.unlink(filePath)
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
16
40
|
|
|
17
41
|
export default defineConfig((config) => {
|
|
18
42
|
const env = loadEnv(config.mode, process.cwd() + '/env', '')
|
|
@@ -23,17 +47,17 @@ export default defineConfig((config) => {
|
|
|
23
47
|
const menuPath = isSaas ? path.resolve('./demos/saas') : path.resolve(demosPath)
|
|
24
48
|
const copyTarget = [
|
|
25
49
|
{
|
|
26
|
-
src: `${demosPath}
|
|
50
|
+
src: `${demosPath}/*`,
|
|
27
51
|
dest: '@demos'
|
|
28
52
|
},
|
|
29
53
|
{
|
|
30
|
-
src: `${apisPath}
|
|
54
|
+
src: `${apisPath}/*`,
|
|
31
55
|
dest: '@demos/apis'
|
|
32
56
|
}
|
|
33
57
|
]
|
|
34
58
|
if (isSaas) {
|
|
35
59
|
copyTarget.push({
|
|
36
|
-
src: `./demos/mobile-first
|
|
60
|
+
src: `./demos/mobile-first/*`,
|
|
37
61
|
dest: '@demos/mobile-first'
|
|
38
62
|
})
|
|
39
63
|
}
|
|
@@ -75,7 +99,8 @@ export default defineConfig((config) => {
|
|
|
75
99
|
Unocss(UnoCssConfig),
|
|
76
100
|
viteStaticCopy({
|
|
77
101
|
targets: copyTarget
|
|
78
|
-
})
|
|
102
|
+
}),
|
|
103
|
+
delStatic()
|
|
79
104
|
],
|
|
80
105
|
optimizeDeps: getOptimizeDeps(3),
|
|
81
106
|
build: {
|