From a790f0d8a98b9fcad5ccd42af2982435170b5d99 Mon Sep 17 00:00:00 2001 From: Justineo Date: Tue, 23 Nov 2021 13:57:56 +0800 Subject: [PATCH] fix: mock icon imports and update veui --- components/OneLive.vue | 9 ++- package-lock.json | 130 ++++++++++++++++++++--------------------- package.json | 10 ++-- 3 files changed, 78 insertions(+), 71 deletions(-) diff --git a/components/OneLive.vue b/components/OneLive.vue index 951d437..af29d5d 100644 --- a/components/OneLive.vue +++ b/components/OneLive.vue @@ -94,6 +94,10 @@ import { transformLessCode } from '../common/transform' 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 { name: 'one-live', components: { @@ -124,7 +128,10 @@ export default { imports: { veui, lodash, - 'veui-theme-dls-icons': {} + ...iconModules.reduce((mocks, module) => { + mocks[module] = true + return mocks + }, {}) } } }, diff --git a/package-lock.json b/package-lock.json index 142a930..2d67016 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@stackblitz/sdk": "^1.5.2", "babel-eslint": "^10.1.0", "babel-plugin-lodash": "^3.3.4", - "babel-plugin-veui": "^2.2.1", + "babel-plugin-veui": "^2.3.0", "cheerio": "^1.0.0-rc.10", "dls-graphics": "^1.0.0-alpha.3", "dls-icons-vue": "^0.14.0", @@ -73,10 +73,10 @@ "stylus-loader": "^3.0.2", "unist-util-remove": "^1.0.1", "unist-util-visit": "^1.4.0", - "veui": "^2.2.1", - "veui-loader": "^2.2.1", - "veui-theme-dls": "^2.2.1", - "veui-theme-dls-icons": "^2.2.1", + "veui": "^2.3.0", + "veui-loader": "^2.3.0", + "veui-theme-dls": "^2.3.0", + "veui-theme-dls-icons": "^2.3.0", "vue-awesome": "^4.1.0", "vue-i18n": "^8.16.0", "vue-live": "^1.17.1", @@ -7979,9 +7979,9 @@ } }, "node_modules/babel-plugin-veui": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.2.1.tgz", - "integrity": "sha512-BHD31St0MW971vCKbINsPh0CLGL4N6VDpsMgseNC8XwFhjGZbkbRYB44Og3IUnw/S6ggwbamOD1NlJPfhmLC1w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.3.0.tgz", + "integrity": "sha512-L+lzN+WFmQ/vVdg42nOpiV1u5l4V85QU6+DVQwcRllXg6H8/C6E6G2zbTHiTjdAYoI//S/h3NhkKmwIrD2IibQ==", "dev": true, "peerDependencies": { "veui": "*" @@ -10936,9 +10936,9 @@ "dev": true }, "node_modules/dls-icons-data": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.0.tgz", - "integrity": "sha512-T9E6rJTFlnVcK3dtTz7jauWKsHLVpJdFkZPMkQWaZd6IKWEwNVL5rwOKf24lybap36NOq8uDZW1EwErX/hu05Q==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.1.tgz", + "integrity": "sha512-UIJvxllrhSwkOsXQSvcMfvQa6NNsbuF2FJwofvblPRCmwe7YaAq4OWh6KcSn+S8QF+DSHL2fH7OZ1jnHo1WQIw==", "dev": true }, "node_modules/dls-icons-vue": { @@ -14907,9 +14907,9 @@ } }, "node_modules/less-plugin-dls": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-3.0.0.tgz", - "integrity": "sha512-WbNJ0vQJykD81V/vK/EBRBxm9LGx3iAXWich4um+XqOVuuVynG6rose92eXN/dZKGmKWrcOw0ek4EdlQyamGzw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-4.0.0.tgz", + "integrity": "sha512-UxD3KvOYLOrCUxAmsY9aBeaNzLzB+EbHetxVBbKN2dCdAWH3H+A/QJ2cGuW1EbSzx8bIDSTAQAWBt/3meI288A==", "dev": true, "dependencies": { "arg": "^4.1.3", @@ -23992,13 +23992,13 @@ } }, "node_modules/veui": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui/-/veui-2.2.1.tgz", - "integrity": "sha512-gmo05A1p6dVY7U8+JML0/SF/9fWTUGkiO9EwQ8GEkX1NgAeQ4Pm2pXfUuuZcgeToBQ8Dzk5Fjr3Yi8Fw7cF9SQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui/-/veui-2.3.0.tgz", + "integrity": "sha512-pJFectcN5dlHPnETnLSmUW981Eu9/DfX77t82axmiA/GKTRn8KzpYbJdM0ez+yLf+g1OA/Hp/63HVtPpiZQ6EA==", "dev": true, "dependencies": { "bytes": "^3.0.0", - "core-js": "^3.6.1", + "core-js": "^3.8.3", "date-fns": "^2.14.0", "dls-graphics": "^1.0.0-alpha.1", "lodash": "^4.17.19", @@ -24012,9 +24012,9 @@ } }, "node_modules/veui-loader": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.2.1.tgz", - "integrity": "sha512-85E2f+MRP9cLQdYUtBjAyD6iSSObZNhEkq6B2qms2H4oESp9MfR9gWZXCFytQyh/1MI5hOzdQqwRdRfHV2pTwg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.3.0.tgz", + "integrity": "sha512-papUDoiUzhYXaJ/osrnO5/tGkYEdbi65T5Y5D82mPX5F/ka/vCpYd4kAUcVa4RWxBjvhw0ER/W/SEhVNREiO9Q==", "dev": true, "dependencies": { "loader-utils": "^2.0.0", @@ -24138,41 +24138,41 @@ } }, "node_modules/veui-theme-dls": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.2.1.tgz", - "integrity": "sha512-4zHjygkSxZ0yXKzsP2wp485uECuXq+8b7lFi9PPQhO/JirictLMmSSKPoGOr3qSDMNwcfNRGRORmKwLBdYl4TA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.3.0.tgz", + "integrity": "sha512-uYeSjCDuwIRVldieWhm1nmCMz2I+1FoYvHX4qDYHWY0TBd0ikK5MwGvN8RGTkFrjModFR1qclRfP5CpOA4htMg==", "dev": true, "dependencies": { "classlist-polyfill": "^1.2.0", "dls-icons-vue": "^0.23.0", "focus-visible": "^4.1.0", - "less-plugin-dls": "^3.0.0", + "less-plugin-dls": "^4.0.0", "less-plugin-est": "^3.0.0", - "veui-theme-dls-icons": "^2.2.1" + "veui-theme-dls-icons": "^2.3.0" }, "peerDependencies": { - "veui": "2.2.1" + "veui": "2.3.0" } }, "node_modules/veui-theme-dls-icons": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.2.1.tgz", - "integrity": "sha512-6MqfOBn5Fa90dnXyHkBeLKr3cuvvl8yqK3/ALE3XbXS97m4hpFxyfUTtm+5CTMrIqphGlkKokTYnu6gmFhcq1A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.3.0.tgz", + "integrity": "sha512-Rp0kzd4rnAa2Kkyu6UyueejH+pCZ0xhKQ4J02SkCW9npemE1FUsJpMRXiESGgz+iZTvJzX1je8A7+ZIzSrHGEg==", "dev": true, "dependencies": { - "dls-icons-vue": "^1.11.0" + "dls-icons-vue": "^1.11.1" }, "peerDependencies": { - "veui": "2.2.1" + "veui": "2.3.0" } }, "node_modules/veui-theme-dls-icons/node_modules/dls-icons-vue": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.0.tgz", - "integrity": "sha512-KKu7U0cuhgK6Yrf45rdc3oKXnSUKrmvxapDXjqWc/0X8qH2JA6dSIcaF3G2QRNxPqqf2ogjIhAqdqa9gvJQ1iw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.1.tgz", + "integrity": "sha512-16gXqiisDciCKUYwYWbhuSG/q1EkK+YHsgqMz6eCA/cgxTKGYUof+5zSOMIWUqqSy9toNJkaWT8tB8cHKfMA7A==", "dev": true, "dependencies": { - "dls-icons-data": "^1.11.0" + "dls-icons-data": "^1.11.1" }, "peerDependencies": { "vue": "2.x" @@ -32152,9 +32152,9 @@ } }, "babel-plugin-veui": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.2.1.tgz", - "integrity": "sha512-BHD31St0MW971vCKbINsPh0CLGL4N6VDpsMgseNC8XwFhjGZbkbRYB44Og3IUnw/S6ggwbamOD1NlJPfhmLC1w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-veui/-/babel-plugin-veui-2.3.0.tgz", + "integrity": "sha512-L+lzN+WFmQ/vVdg42nOpiV1u5l4V85QU6+DVQwcRllXg6H8/C6E6G2zbTHiTjdAYoI//S/h3NhkKmwIrD2IibQ==", "dev": true, "requires": {} }, @@ -34507,9 +34507,9 @@ "dev": true }, "dls-icons-data": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.0.tgz", - "integrity": "sha512-T9E6rJTFlnVcK3dtTz7jauWKsHLVpJdFkZPMkQWaZd6IKWEwNVL5rwOKf24lybap36NOq8uDZW1EwErX/hu05Q==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/dls-icons-data/-/dls-icons-data-1.11.1.tgz", + "integrity": "sha512-UIJvxllrhSwkOsXQSvcMfvQa6NNsbuF2FJwofvblPRCmwe7YaAq4OWh6KcSn+S8QF+DSHL2fH7OZ1jnHo1WQIw==", "dev": true }, "dls-icons-vue": { @@ -37696,9 +37696,9 @@ } }, "less-plugin-dls": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-3.0.0.tgz", - "integrity": "sha512-WbNJ0vQJykD81V/vK/EBRBxm9LGx3iAXWich4um+XqOVuuVynG6rose92eXN/dZKGmKWrcOw0ek4EdlQyamGzw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/less-plugin-dls/-/less-plugin-dls-4.0.0.tgz", + "integrity": "sha512-UxD3KvOYLOrCUxAmsY9aBeaNzLzB+EbHetxVBbKN2dCdAWH3H+A/QJ2cGuW1EbSzx8bIDSTAQAWBt/3meI288A==", "dev": true, "requires": { "arg": "^4.1.3", @@ -44991,13 +44991,13 @@ "dev": true }, "veui": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui/-/veui-2.2.1.tgz", - "integrity": "sha512-gmo05A1p6dVY7U8+JML0/SF/9fWTUGkiO9EwQ8GEkX1NgAeQ4Pm2pXfUuuZcgeToBQ8Dzk5Fjr3Yi8Fw7cF9SQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui/-/veui-2.3.0.tgz", + "integrity": "sha512-pJFectcN5dlHPnETnLSmUW981Eu9/DfX77t82axmiA/GKTRn8KzpYbJdM0ez+yLf+g1OA/Hp/63HVtPpiZQ6EA==", "dev": true, "requires": { "bytes": "^3.0.0", - "core-js": "^3.6.1", + "core-js": "^3.8.3", "date-fns": "^2.14.0", "dls-graphics": "^1.0.0-alpha.1", "lodash": "^4.17.19", @@ -45016,9 +45016,9 @@ } }, "veui-loader": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.2.1.tgz", - "integrity": "sha512-85E2f+MRP9cLQdYUtBjAyD6iSSObZNhEkq6B2qms2H4oESp9MfR9gWZXCFytQyh/1MI5hOzdQqwRdRfHV2pTwg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.3.0.tgz", + "integrity": "sha512-papUDoiUzhYXaJ/osrnO5/tGkYEdbi65T5Y5D82mPX5F/ka/vCpYd4kAUcVa4RWxBjvhw0ER/W/SEhVNREiO9Q==", "dev": true, "requires": { "loader-utils": "^2.0.0", @@ -45108,17 +45108,17 @@ } }, "veui-theme-dls": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.2.1.tgz", - "integrity": "sha512-4zHjygkSxZ0yXKzsP2wp485uECuXq+8b7lFi9PPQhO/JirictLMmSSKPoGOr3qSDMNwcfNRGRORmKwLBdYl4TA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.3.0.tgz", + "integrity": "sha512-uYeSjCDuwIRVldieWhm1nmCMz2I+1FoYvHX4qDYHWY0TBd0ikK5MwGvN8RGTkFrjModFR1qclRfP5CpOA4htMg==", "dev": true, "requires": { "classlist-polyfill": "^1.2.0", "dls-icons-vue": "^0.23.0", "focus-visible": "^4.1.0", - "less-plugin-dls": "^3.0.0", + "less-plugin-dls": "^4.0.0", "less-plugin-est": "^3.0.0", - "veui-theme-dls-icons": "^2.2.1" + "veui-theme-dls-icons": "^2.3.0" }, "dependencies": { "dls-icons-vue": { @@ -45131,21 +45131,21 @@ } }, "veui-theme-dls-icons": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.2.1.tgz", - "integrity": "sha512-6MqfOBn5Fa90dnXyHkBeLKr3cuvvl8yqK3/ALE3XbXS97m4hpFxyfUTtm+5CTMrIqphGlkKokTYnu6gmFhcq1A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.3.0.tgz", + "integrity": "sha512-Rp0kzd4rnAa2Kkyu6UyueejH+pCZ0xhKQ4J02SkCW9npemE1FUsJpMRXiESGgz+iZTvJzX1je8A7+ZIzSrHGEg==", "dev": true, "requires": { - "dls-icons-vue": "^1.11.0" + "dls-icons-vue": "^1.11.1" }, "dependencies": { "dls-icons-vue": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.0.tgz", - "integrity": "sha512-KKu7U0cuhgK6Yrf45rdc3oKXnSUKrmvxapDXjqWc/0X8qH2JA6dSIcaF3G2QRNxPqqf2ogjIhAqdqa9gvJQ1iw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/dls-icons-vue/-/dls-icons-vue-1.11.1.tgz", + "integrity": "sha512-16gXqiisDciCKUYwYWbhuSG/q1EkK+YHsgqMz6eCA/cgxTKGYUof+5zSOMIWUqqSy9toNJkaWT8tB8cHKfMA7A==", "dev": true, "requires": { - "dls-icons-data": "^1.11.0" + "dls-icons-data": "^1.11.1" } } } diff --git a/package.json b/package.json index eb63b1b..b438267 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@stackblitz/sdk": "^1.5.2", "babel-eslint": "^10.1.0", "babel-plugin-lodash": "^3.3.4", - "babel-plugin-veui": "^2.2.1", + "babel-plugin-veui": "^2.3.0", "cheerio": "^1.0.0-rc.10", "dls-graphics": "^1.0.0-alpha.3", "dls-icons-vue": "^0.14.0", @@ -81,10 +81,10 @@ "stylus-loader": "^3.0.2", "unist-util-remove": "^1.0.1", "unist-util-visit": "^1.4.0", - "veui": "^2.2.1", - "veui-loader": "^2.2.1", - "veui-theme-dls": "^2.2.1", - "veui-theme-dls-icons": "^2.2.1", + "veui": "^2.3.0", + "veui-loader": "^2.3.0", + "veui-theme-dls": "^2.3.0", + "veui-theme-dls-icons": "^2.3.0", "vue-awesome": "^4.1.0", "vue-i18n": "^8.16.0", "vue-live": "^1.17.1",