@varlet/cli 1.22.0-alpha.3 → 1.22.0-alpha.7
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/lib/config/vite.config.js +12 -1
- package/package.json +6 -5
- package/site/mobile/App.vue +2 -2
- package/site/mobile/main.ts +1 -1
- package/site/pc/App.vue +1 -1
- package/site/pc/components/AppHeader.vue +1 -1
- package/site/pc/components/AppSidebar.vue +1 -1
- package/site/pc/main.ts +1 -1
- package/site/useProgress.ts +1 -1
- package/site/utils.ts +1 -1
|
@@ -65,6 +65,7 @@ function getBuildConfig(varletConfig) {
|
|
|
65
65
|
outDir: constant_1.SITE_OUTPUT_PATH,
|
|
66
66
|
brotliSize: false,
|
|
67
67
|
emptyOutDir: true,
|
|
68
|
+
minify: 'terser',
|
|
68
69
|
rollupOptions: {
|
|
69
70
|
input: {
|
|
70
71
|
main: path_1.resolve(constant_1.SITE, 'index.html'),
|
|
@@ -89,6 +90,15 @@ function inlineCSS(fileName, dir) {
|
|
|
89
90
|
},
|
|
90
91
|
};
|
|
91
92
|
}
|
|
93
|
+
function clear() {
|
|
94
|
+
return {
|
|
95
|
+
name: 'varlet-clear-vite-plugin',
|
|
96
|
+
apply: 'build',
|
|
97
|
+
closeBundle: function () {
|
|
98
|
+
fs_extra_1.removeSync(path_1.resolve(constant_1.CWD, 'dist'));
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
}
|
|
92
102
|
function getUMDConfig(varletConfig) {
|
|
93
103
|
var name = lodash_1.get(varletConfig, 'name');
|
|
94
104
|
var fileName = lodash_1.kebabCase(name) + ".js";
|
|
@@ -96,6 +106,7 @@ function getUMDConfig(varletConfig) {
|
|
|
96
106
|
logLevel: 'silent',
|
|
97
107
|
build: {
|
|
98
108
|
emptyOutDir: true,
|
|
109
|
+
minify: 'terser',
|
|
99
110
|
lib: {
|
|
100
111
|
name: name,
|
|
101
112
|
formats: ['umd'],
|
|
@@ -113,7 +124,7 @@ function getUMDConfig(varletConfig) {
|
|
|
113
124
|
},
|
|
114
125
|
},
|
|
115
126
|
},
|
|
116
|
-
plugins: [inlineCSS(fileName, constant_1.UMD_DIR)],
|
|
127
|
+
plugins: [inlineCSS(fileName, constant_1.UMD_DIR), clear()],
|
|
117
128
|
};
|
|
118
129
|
}
|
|
119
130
|
exports.getUMDConfig = getUMDConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "1.22.0-alpha.
|
|
3
|
+
"version": "1.22.0-alpha.7+63386141",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"varlet-cli": "./lib/index.js"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dev": "tsc --watch",
|
|
32
32
|
"build": "tsc"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "63386141058b9268358eda5956cd7c3fd52cf9b5",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/core": "^7.14.8",
|
|
37
37
|
"@babel/preset-env": "^7.14.8",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@varlet/markdown-vite-plugin": "^1.20.0",
|
|
45
45
|
"@varlet/stylelint-config": "^1.9.0",
|
|
46
46
|
"@varlet/touch-emulator": "^1.0.1",
|
|
47
|
-
"@varlet/ui": "^1.22.0-alpha.
|
|
47
|
+
"@varlet/ui": "^1.22.0-alpha.7+63386141",
|
|
48
48
|
"@vitejs/plugin-vue": "1.9.2",
|
|
49
49
|
"@vitejs/plugin-vue-jsx": "1.1.8",
|
|
50
50
|
"@vue/babel-plugin-jsx": "^1.0.7",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"less": "^3.12.2",
|
|
68
68
|
"lint-staged": "^10.5.0",
|
|
69
69
|
"lodash": "^4.17.21",
|
|
70
|
+
"lodash-es": "^4.17.21",
|
|
70
71
|
"ora": "^5.4.0",
|
|
71
72
|
"prettier": "^2.3.2",
|
|
72
73
|
"release-it": "^14.11.5",
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
"stylelint": "^13.13.1",
|
|
75
76
|
"ts-jest": "^26.5.1",
|
|
76
77
|
"typescript": "^4.3.5",
|
|
77
|
-
"vite": "2.
|
|
78
|
+
"vite": "2.6.0-beta.2",
|
|
78
79
|
"vite-plugin-html": "^2.1.0",
|
|
79
80
|
"vue-jest": "^5.0.0-alpha.8",
|
|
80
81
|
"vue-loader": "16.5.0",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"@types/fs-extra": "^9.0.2",
|
|
86
87
|
"@types/hash-sum": "^1.0.0",
|
|
87
88
|
"@types/jest": "^26.0.15",
|
|
88
|
-
"@types/lodash": "^4.14.
|
|
89
|
+
"@types/lodash": "^4.14.174"
|
|
89
90
|
},
|
|
90
91
|
"peerDependencies": {
|
|
91
92
|
"@vue/compiler-sfc": "3.2.17",
|
package/site/mobile/App.vue
CHANGED
|
@@ -53,7 +53,7 @@ import config from '@config'
|
|
|
53
53
|
import { computed, ComputedRef, defineComponent, ref, Ref, watch } from 'vue'
|
|
54
54
|
import { useRoute } from 'vue-router'
|
|
55
55
|
import { bigCamelize, removeEmpty, setThemes, watchLang } from '../utils'
|
|
56
|
-
import { get } from 'lodash'
|
|
56
|
+
import { get } from 'lodash-es'
|
|
57
57
|
|
|
58
58
|
type Language = Record<string, string>
|
|
59
59
|
|
|
@@ -130,7 +130,7 @@ header {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.app-bar {
|
|
133
|
-
background: var(--site-color-app-bar);
|
|
133
|
+
background: var(--site-color-app-bar) !important;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.router-view__block {
|
package/site/mobile/main.ts
CHANGED
|
@@ -15,7 +15,7 @@ import '@varlet/ui/es/menu/style'
|
|
|
15
15
|
import '@varlet/ui/es/cell/style'
|
|
16
16
|
import '@varlet/ui/es/ripple/style'
|
|
17
17
|
|
|
18
|
-
import { get } from 'lodash'
|
|
18
|
+
import { get } from 'lodash-es'
|
|
19
19
|
import { inIframe, isPhone } from '../utils'
|
|
20
20
|
|
|
21
21
|
const redirect = get(config, 'mobile.redirect')
|
package/site/pc/App.vue
CHANGED
|
@@ -36,7 +36,7 @@ import AppHeader from './components/AppHeader'
|
|
|
36
36
|
import AppSidebar from './components/AppSidebar'
|
|
37
37
|
import { defineComponent, nextTick, onMounted, ref, Ref, watch } from 'vue'
|
|
38
38
|
import { useRoute } from 'vue-router'
|
|
39
|
-
import { get } from 'lodash'
|
|
39
|
+
import { get } from 'lodash-es'
|
|
40
40
|
import { getPCLocationInfo, isPhone, MenuTypes, setThemes } from '../utils'
|
|
41
41
|
|
|
42
42
|
type Language = Record<string, string>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
// @ts-ignore
|
|
49
49
|
import config from '@config'
|
|
50
50
|
import { ref, computed } from 'vue'
|
|
51
|
-
import { get } from 'lodash'
|
|
51
|
+
import { get } from 'lodash-es'
|
|
52
52
|
import { getPCLocationInfo, removeEmpty } from '../../utils'
|
|
53
53
|
import { useRouter } from 'vue-router'
|
|
54
54
|
import type { Ref, ComputedRef } from 'vue'
|
|
@@ -30,7 +30,7 @@ import { MenuTypes } from '../../utils'
|
|
|
30
30
|
import { reactive, ref } from 'vue'
|
|
31
31
|
import type { PropType } from 'vue'
|
|
32
32
|
import type { Menu } from '../App'
|
|
33
|
-
import { get } from 'lodash'
|
|
33
|
+
import { get } from 'lodash-es'
|
|
34
34
|
|
|
35
35
|
export default {
|
|
36
36
|
name: 'AppSidebar',
|
package/site/pc/main.ts
CHANGED
|
@@ -12,7 +12,7 @@ import '@varlet/ui/es/icon/style'
|
|
|
12
12
|
|
|
13
13
|
import { createApp } from 'vue'
|
|
14
14
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
15
|
-
import { get } from 'lodash'
|
|
15
|
+
import { get } from 'lodash-es'
|
|
16
16
|
import { useProgress } from '../useProgress'
|
|
17
17
|
|
|
18
18
|
const defaultLanguage = get(config, 'defaultLanguage')
|
package/site/useProgress.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Progress } from '@varlet/ui'
|
|
|
4
4
|
import config from '@config'
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import { mountInstance } from '@varlet/ui/es/utils/components'
|
|
7
|
-
import { get } from 'lodash'
|
|
7
|
+
import { get } from 'lodash-es'
|
|
8
8
|
|
|
9
9
|
export function useProgress() {
|
|
10
10
|
const props = reactive({
|
package/site/utils.ts
CHANGED