fix: mock icon imports and update veui

This commit is contained in:
Justineo 2021-11-23 13:57:56 +08:00
parent 64db0c7b70
commit a790f0d8a9
No known key found for this signature in database
GPG Key ID: B73F0979CF18A0EA
3 changed files with 78 additions and 71 deletions

View File

@ -94,6 +94,10 @@ import { transformLessCode } from '../common/transform'
Vue.use(toast) Vue.use(toast)
const iconPackage = 'veui-theme-dls-icons'
const iconNames = Object.keys(Icon.icons).filter(name => !name.startsWith('one-demo-') && Icon.icons[name])
const iconModules = [iconPackage].concat(iconNames.map(name => `${iconPackage}/${name}`))
export default { export default {
name: 'one-live', name: 'one-live',
components: { components: {
@ -124,7 +128,10 @@ export default {
imports: { imports: {
veui, veui,
lodash, lodash,
'veui-theme-dls-icons': {} ...iconModules.reduce((mocks, module) => {
mocks[module] = true
return mocks
}, {})
} }
} }
}, },

130
package-lock.json generated
View File

@ -17,7 +17,7 @@
"@stackblitz/sdk": "^1.5.2", "@stackblitz/sdk": "^1.5.2",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-lodash": "^3.3.4", "babel-plugin-lodash": "^3.3.4",
"babel-plugin-veui": "^2.2.1", "babel-plugin-veui": "^2.3.0",
"cheerio": "^1.0.0-rc.10", "cheerio": "^1.0.0-rc.10",
"dls-graphics": "^1.0.0-alpha.3", "dls-graphics": "^1.0.0-alpha.3",
"dls-icons-vue": "^0.14.0", "dls-icons-vue": "^0.14.0",
@ -73,10 +73,10 @@
"stylus-loader": "^3.0.2", "stylus-loader": "^3.0.2",
"unist-util-remove": "^1.0.1", "unist-util-remove": "^1.0.1",
"unist-util-visit": "^1.4.0", "unist-util-visit": "^1.4.0",
"veui": "^2.2.1", "veui": "^2.3.0",
"veui-loader": "^2.2.1", "veui-loader": "^2.3.0",
"veui-theme-dls": "^2.2.1", "veui-theme-dls": "^2.3.0",
"veui-theme-dls-icons": "^2.2.1", "veui-theme-dls-icons": "^2.3.0",
"vue-awesome": "^4.1.0", "vue-awesome": "^4.1.0",
"vue-i18n": "^8.16.0", "vue-i18n": "^8.16.0",
"vue-live": "^1.17.1", "vue-live": "^1.17.1",
@ -7979,9 +7979,9 @@
} }
}, },
"node_modules/babel-plugin-veui": { "node_modules/babel-plugin-veui": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.2.1.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.3.0.tgz",
"integrity": "sha512-BHD31St0MW971vCKbINsPh0CLGL4N6VDpsMgseNC8XwFhjGZbkbRYB44Og3IUnw/S6ggwbamOD1NlJPfhmLC1w==", "integrity": "sha512-L+lzN+WFmQ/vVdg42nOpiV1u5l4V85QU6+DVQwcRllXg6H8/C6E6G2zbTHiTjdAYoI//S/h3NhkKmwIrD2IibQ==",
"dev": true, "dev": true,
"peerDependencies": { "peerDependencies": {
"veui": "*" "veui": "*"
@ -10936,9 +10936,9 @@
"dev": true "dev": true
}, },
"node_modules/dls-icons-data": { "node_modules/dls-icons-data": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.0.tgz", "resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.1.tgz",
"integrity": "sha512-T9E6rJTFlnVcK3dtTz7jauWKsHLVpJdFkZPMkQWaZd6IKWEwNVL5rwOKf24lybap36NOq8uDZW1EwErX/hu05Q==", "integrity": "sha512-UIJvxllrhSwkOsXQSvcMfvQa6NNsbuF2FJwofvblPRCmwe7YaAq4OWh6KcSn+S8QF+DSHL2fH7OZ1jnHo1WQIw==",
"dev": true "dev": true
}, },
"node_modules/dls-icons-vue": { "node_modules/dls-icons-vue": {
@ -14907,9 +14907,9 @@
} }
}, },
"node_modules/less-plugin-dls": { "node_modules/less-plugin-dls": {
"version": "3.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-3.0.0.tgz", "resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-4.0.0.tgz",
"integrity": "sha512-WbNJ0vQJykD81V/vK/EBRBxm9LGx3iAXWich4um+XqOVuuVynG6rose92eXN/dZKGmKWrcOw0ek4EdlQyamGzw==", "integrity": "sha512-UxD3KvOYLOrCUxAmsY9aBeaNzLzB+EbHetxVBbKN2dCdAWH3H+A/QJ2cGuW1EbSzx8bIDSTAQAWBt/3meI288A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"arg": "^4.1.3", "arg": "^4.1.3",
@ -23992,13 +23992,13 @@
} }
}, },
"node_modules/veui": { "node_modules/veui": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui/-/veui-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui/-/veui-2.3.0.tgz",
"integrity": "sha512-gmo05A1p6dVY7U8+JML0/SF/9fWTUGkiO9EwQ8GEkX1NgAeQ4Pm2pXfUuuZcgeToBQ8Dzk5Fjr3Yi8Fw7cF9SQ==", "integrity": "sha512-pJFectcN5dlHPnETnLSmUW981Eu9/DfX77t82axmiA/GKTRn8KzpYbJdM0ez+yLf+g1OA/Hp/63HVtPpiZQ6EA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"bytes": "^3.0.0", "bytes": "^3.0.0",
"core-js": "^3.6.1", "core-js": "^3.8.3",
"date-fns": "^2.14.0", "date-fns": "^2.14.0",
"dls-graphics": "^1.0.0-alpha.1", "dls-graphics": "^1.0.0-alpha.1",
"lodash": "^4.17.19", "lodash": "^4.17.19",
@ -24012,9 +24012,9 @@
} }
}, },
"node_modules/veui-loader": { "node_modules/veui-loader": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.3.0.tgz",
"integrity": "sha512-85E2f+MRP9cLQdYUtBjAyD6iSSObZNhEkq6B2qms2H4oESp9MfR9gWZXCFytQyh/1MI5hOzdQqwRdRfHV2pTwg==", "integrity": "sha512-papUDoiUzhYXaJ/osrnO5/tGkYEdbi65T5Y5D82mPX5F/ka/vCpYd4kAUcVa4RWxBjvhw0ER/W/SEhVNREiO9Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",
@ -24138,41 +24138,41 @@
} }
}, },
"node_modules/veui-theme-dls": { "node_modules/veui-theme-dls": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.3.0.tgz",
"integrity": "sha512-4zHjygkSxZ0yXKzsP2wp485uECuXq+8b7lFi9PPQhO/JirictLMmSSKPoGOr3qSDMNwcfNRGRORmKwLBdYl4TA==", "integrity": "sha512-uYeSjCDuwIRVldieWhm1nmCMz2I+1FoYvHX4qDYHWY0TBd0ikK5MwGvN8RGTkFrjModFR1qclRfP5CpOA4htMg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"classlist-polyfill": "^1.2.0", "classlist-polyfill": "^1.2.0",
"dls-icons-vue": "^0.23.0", "dls-icons-vue": "^0.23.0",
"focus-visible": "^4.1.0", "focus-visible": "^4.1.0",
"less-plugin-dls": "^3.0.0", "less-plugin-dls": "^4.0.0",
"less-plugin-est": "^3.0.0", "less-plugin-est": "^3.0.0",
"veui-theme-dls-icons": "^2.2.1" "veui-theme-dls-icons": "^2.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"veui": "2.2.1" "veui": "2.3.0"
} }
}, },
"node_modules/veui-theme-dls-icons": { "node_modules/veui-theme-dls-icons": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.3.0.tgz",
"integrity": "sha512-6MqfOBn5Fa90dnXyHkBeLKr3cuvvl8yqK3/ALE3XbXS97m4hpFxyfUTtm+5CTMrIqphGlkKokTYnu6gmFhcq1A==", "integrity": "sha512-Rp0kzd4rnAa2Kkyu6UyueejH+pCZ0xhKQ4J02SkCW9npemE1FUsJpMRXiESGgz+iZTvJzX1je8A7+ZIzSrHGEg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"dls-icons-vue": "^1.11.0" "dls-icons-vue": "^1.11.1"
}, },
"peerDependencies": { "peerDependencies": {
"veui": "2.2.1" "veui": "2.3.0"
} }
}, },
"node_modules/veui-theme-dls-icons/node_modules/dls-icons-vue": { "node_modules/veui-theme-dls-icons/node_modules/dls-icons-vue": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.0.tgz", "resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.1.tgz",
"integrity": "sha512-KKu7U0cuhgK6Yrf45rdc3oKXnSUKrmvxapDXjqWc/0X8qH2JA6dSIcaF3G2QRNxPqqf2ogjIhAqdqa9gvJQ1iw==", "integrity": "sha512-16gXqiisDciCKUYwYWbhuSG/q1EkK+YHsgqMz6eCA/cgxTKGYUof+5zSOMIWUqqSy9toNJkaWT8tB8cHKfMA7A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"dls-icons-data": "^1.11.0" "dls-icons-data": "^1.11.1"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "2.x" "vue": "2.x"
@ -32152,9 +32152,9 @@
} }
}, },
"babel-plugin-veui": { "babel-plugin-veui": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.2.1.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.3.0.tgz",
"integrity": "sha512-BHD31St0MW971vCKbINsPh0CLGL4N6VDpsMgseNC8XwFhjGZbkbRYB44Og3IUnw/S6ggwbamOD1NlJPfhmLC1w==", "integrity": "sha512-L+lzN+WFmQ/vVdg42nOpiV1u5l4V85QU6+DVQwcRllXg6H8/C6E6G2zbTHiTjdAYoI//S/h3NhkKmwIrD2IibQ==",
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },
@ -34507,9 +34507,9 @@
"dev": true "dev": true
}, },
"dls-icons-data": { "dls-icons-data": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.0.tgz", "resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.1.tgz",
"integrity": "sha512-T9E6rJTFlnVcK3dtTz7jauWKsHLVpJdFkZPMkQWaZd6IKWEwNVL5rwOKf24lybap36NOq8uDZW1EwErX/hu05Q==", "integrity": "sha512-UIJvxllrhSwkOsXQSvcMfvQa6NNsbuF2FJwofvblPRCmwe7YaAq4OWh6KcSn+S8QF+DSHL2fH7OZ1jnHo1WQIw==",
"dev": true "dev": true
}, },
"dls-icons-vue": { "dls-icons-vue": {
@ -37696,9 +37696,9 @@
} }
}, },
"less-plugin-dls": { "less-plugin-dls": {
"version": "3.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-3.0.0.tgz", "resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-4.0.0.tgz",
"integrity": "sha512-WbNJ0vQJykD81V/vK/EBRBxm9LGx3iAXWich4um+XqOVuuVynG6rose92eXN/dZKGmKWrcOw0ek4EdlQyamGzw==", "integrity": "sha512-UxD3KvOYLOrCUxAmsY9aBeaNzLzB+EbHetxVBbKN2dCdAWH3H+A/QJ2cGuW1EbSzx8bIDSTAQAWBt/3meI288A==",
"dev": true, "dev": true,
"requires": { "requires": {
"arg": "^4.1.3", "arg": "^4.1.3",
@ -44991,13 +44991,13 @@
"dev": true "dev": true
}, },
"veui": { "veui": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui/-/veui-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui/-/veui-2.3.0.tgz",
"integrity": "sha512-gmo05A1p6dVY7U8+JML0/SF/9fWTUGkiO9EwQ8GEkX1NgAeQ4Pm2pXfUuuZcgeToBQ8Dzk5Fjr3Yi8Fw7cF9SQ==", "integrity": "sha512-pJFectcN5dlHPnETnLSmUW981Eu9/DfX77t82axmiA/GKTRn8KzpYbJdM0ez+yLf+g1OA/Hp/63HVtPpiZQ6EA==",
"dev": true, "dev": true,
"requires": { "requires": {
"bytes": "^3.0.0", "bytes": "^3.0.0",
"core-js": "^3.6.1", "core-js": "^3.8.3",
"date-fns": "^2.14.0", "date-fns": "^2.14.0",
"dls-graphics": "^1.0.0-alpha.1", "dls-graphics": "^1.0.0-alpha.1",
"lodash": "^4.17.19", "lodash": "^4.17.19",
@ -45016,9 +45016,9 @@
} }
}, },
"veui-loader": { "veui-loader": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.3.0.tgz",
"integrity": "sha512-85E2f+MRP9cLQdYUtBjAyD6iSSObZNhEkq6B2qms2H4oESp9MfR9gWZXCFytQyh/1MI5hOzdQqwRdRfHV2pTwg==", "integrity": "sha512-papUDoiUzhYXaJ/osrnO5/tGkYEdbi65T5Y5D82mPX5F/ka/vCpYd4kAUcVa4RWxBjvhw0ER/W/SEhVNREiO9Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",
@ -45108,17 +45108,17 @@
} }
}, },
"veui-theme-dls": { "veui-theme-dls": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.3.0.tgz",
"integrity": "sha512-4zHjygkSxZ0yXKzsP2wp485uECuXq+8b7lFi9PPQhO/JirictLMmSSKPoGOr3qSDMNwcfNRGRORmKwLBdYl4TA==", "integrity": "sha512-uYeSjCDuwIRVldieWhm1nmCMz2I+1FoYvHX4qDYHWY0TBd0ikK5MwGvN8RGTkFrjModFR1qclRfP5CpOA4htMg==",
"dev": true, "dev": true,
"requires": { "requires": {
"classlist-polyfill": "^1.2.0", "classlist-polyfill": "^1.2.0",
"dls-icons-vue": "^0.23.0", "dls-icons-vue": "^0.23.0",
"focus-visible": "^4.1.0", "focus-visible": "^4.1.0",
"less-plugin-dls": "^3.0.0", "less-plugin-dls": "^4.0.0",
"less-plugin-est": "^3.0.0", "less-plugin-est": "^3.0.0",
"veui-theme-dls-icons": "^2.2.1" "veui-theme-dls-icons": "^2.3.0"
}, },
"dependencies": { "dependencies": {
"dls-icons-vue": { "dls-icons-vue": {
@ -45131,21 +45131,21 @@
} }
}, },
"veui-theme-dls-icons": { "veui-theme-dls-icons": {
"version": "2.2.1", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.2.1.tgz", "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.3.0.tgz",
"integrity": "sha512-6MqfOBn5Fa90dnXyHkBeLKr3cuvvl8yqK3/ALE3XbXS97m4hpFxyfUTtm+5CTMrIqphGlkKokTYnu6gmFhcq1A==", "integrity": "sha512-Rp0kzd4rnAa2Kkyu6UyueejH+pCZ0xhKQ4J02SkCW9npemE1FUsJpMRXiESGgz+iZTvJzX1je8A7+ZIzSrHGEg==",
"dev": true, "dev": true,
"requires": { "requires": {
"dls-icons-vue": "^1.11.0" "dls-icons-vue": "^1.11.1"
}, },
"dependencies": { "dependencies": {
"dls-icons-vue": { "dls-icons-vue": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.0.tgz", "resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.1.tgz",
"integrity": "sha512-KKu7U0cuhgK6Yrf45rdc3oKXnSUKrmvxapDXjqWc/0X8qH2JA6dSIcaF3G2QRNxPqqf2ogjIhAqdqa9gvJQ1iw==", "integrity": "sha512-16gXqiisDciCKUYwYWbhuSG/q1EkK+YHsgqMz6eCA/cgxTKGYUof+5zSOMIWUqqSy9toNJkaWT8tB8cHKfMA7A==",
"dev": true, "dev": true,
"requires": { "requires": {
"dls-icons-data": "^1.11.0" "dls-icons-data": "^1.11.1"
} }
} }
} }

View File

@ -25,7 +25,7 @@
"@stackblitz/sdk": "^1.5.2", "@stackblitz/sdk": "^1.5.2",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-lodash": "^3.3.4", "babel-plugin-lodash": "^3.3.4",
"babel-plugin-veui": "^2.2.1", "babel-plugin-veui": "^2.3.0",
"cheerio": "^1.0.0-rc.10", "cheerio": "^1.0.0-rc.10",
"dls-graphics": "^1.0.0-alpha.3", "dls-graphics": "^1.0.0-alpha.3",
"dls-icons-vue": "^0.14.0", "dls-icons-vue": "^0.14.0",
@ -81,10 +81,10 @@
"stylus-loader": "^3.0.2", "stylus-loader": "^3.0.2",
"unist-util-remove": "^1.0.1", "unist-util-remove": "^1.0.1",
"unist-util-visit": "^1.4.0", "unist-util-visit": "^1.4.0",
"veui": "^2.2.1", "veui": "^2.3.0",
"veui-loader": "^2.2.1", "veui-loader": "^2.3.0",
"veui-theme-dls": "^2.2.1", "veui-theme-dls": "^2.3.0",
"veui-theme-dls-icons": "^2.2.1", "veui-theme-dls-icons": "^2.3.0",
"vue-awesome": "^4.1.0", "vue-awesome": "^4.1.0",
"vue-i18n": "^8.16.0", "vue-i18n": "^8.16.0",
"vue-live": "^1.17.1", "vue-live": "^1.17.1",