From da036035c130f3264a7f19117875e5e10f537eed Mon Sep 17 00:00:00 2001 From: zouzhibing Date: Thu, 19 May 2022 11:48:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=87=BAzip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 20 +- package.json | 3 + src/components/SvgIcon/index.vue | 36 +++ src/icons/index.js | 9 + src/icons/svg/borrow.svg | 1 + src/icons/svg/compass.svg | 1 + src/icons/svg/dashboard.svg | 1 + src/icons/svg/entrust.svg | 1 + src/icons/svg/example.svg | 1 + src/icons/svg/eye-open.svg | 1 + src/icons/svg/eye.svg | 1 + src/icons/svg/form.svg | 1 + src/icons/svg/go-out.svg | 1 + src/icons/svg/home.svg | 1 + src/icons/svg/horn.svg | 1 + src/icons/svg/inquiry.svg | 1 + src/icons/svg/link.svg | 1 + src/icons/svg/nested.svg | 1 + src/icons/svg/notice.svg | 1 + src/icons/svg/password.svg | 1 + src/icons/svg/put-in.svg | 1 + src/icons/svg/report-form.svg | 1 + src/icons/svg/settings.svg | 1 + src/icons/svg/synchronous.svg | 1 + src/icons/svg/table.svg | 1 + src/icons/svg/take-over.svg | 1 + src/icons/svg/task.svg | 1 + src/icons/svg/todo.svg | 1 + src/icons/svg/tree.svg | 1 + src/icons/svg/update.svg | 1 + src/icons/svg/user.svg | 1 + src/icons/svgo.yml | 22 ++ src/main.ts | 3 +- src/router/index.ts | 21 ++ src/utils/downloadzip.ts | 260 +++++++++++++++++++ src/views/login/index.vue | 46 +++- src/views/table/components/comprehensive.vue | 5 + src/views/table/comprehensive.vue | 21 +- src/views/table/inline-edit-table.vue | 7 +- src/views/zip/download.vue | 104 ++++++++ vue.config.js | 21 +- yarn.lock | 235 ++++++++++++++++- 42 files changed, 802 insertions(+), 38 deletions(-) create mode 100644 src/components/SvgIcon/index.vue create mode 100644 src/icons/index.js create mode 100644 src/icons/svg/borrow.svg create mode 100644 src/icons/svg/compass.svg create mode 100644 src/icons/svg/dashboard.svg create mode 100644 src/icons/svg/entrust.svg create mode 100644 src/icons/svg/example.svg create mode 100644 src/icons/svg/eye-open.svg create mode 100644 src/icons/svg/eye.svg create mode 100644 src/icons/svg/form.svg create mode 100644 src/icons/svg/go-out.svg create mode 100644 src/icons/svg/home.svg create mode 100644 src/icons/svg/horn.svg create mode 100644 src/icons/svg/inquiry.svg create mode 100644 src/icons/svg/link.svg create mode 100644 src/icons/svg/nested.svg create mode 100644 src/icons/svg/notice.svg create mode 100644 src/icons/svg/password.svg create mode 100644 src/icons/svg/put-in.svg create mode 100644 src/icons/svg/report-form.svg create mode 100644 src/icons/svg/settings.svg create mode 100644 src/icons/svg/synchronous.svg create mode 100644 src/icons/svg/table.svg create mode 100644 src/icons/svg/take-over.svg create mode 100644 src/icons/svg/task.svg create mode 100644 src/icons/svg/todo.svg create mode 100644 src/icons/svg/tree.svg create mode 100644 src/icons/svg/update.svg create mode 100644 src/icons/svg/user.svg create mode 100644 src/icons/svgo.yml create mode 100644 src/utils/downloadzip.ts create mode 100644 src/views/zip/download.vue diff --git a/README.md b/README.md index d4200be..4195884 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ vue-element-perfect 是一个后台前端解决方案, 基于Vue3.0+TS+Element-p ## 效果预览 -#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案 预览地址](http://182.61.5.190:8889/) +### 在线预览点击 —— [企业级、通用型中后台前端解决方案 ](http://182.61.5.190:8889/) -附上github地址 [vue-admin-perfect](https://github.com/zouzhibin/vue-admin-perfect) +### 附上github地址点击跳转 [vue-admin-perfect](https://github.com/zouzhibin/vue-admin-perfect) ## 目录结构介绍 @@ -43,18 +43,7 @@ vue3.0 + Typescript + vuex + vue-router + Element-Plus scss - 其他各组件 - -vue-element-perfect 是一个后台前端解决方案, 基于Vue3.0+TS+Element-plus实现。它使用了最新的前端技术栈、动态路由,权限验证,并且有着丰富的组件。 - - -## 效果预览 - -#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案 预览地址](http://182.61.5.190:8889/) - -附上github地址 [vue-admin-perfect](https://github.com/zouzhibin/vue-admin-perfect) - -## 项目 master 分支 - +## 项目 master 分支 基于vue3.0 + Typescript + vuex + vue-router + Element-Plus scss ``` # 克隆项目 git clone https://github.com/zouzhibin/vue-admin-perfect.git @@ -66,7 +55,8 @@ yarn yarn serve ``` -## 项目 uniapp 分支 + +## 项目 uniapp 分支 基于 uniapp +vuex +element scss ``` # 克隆项目 切换 uniapp分支 diff --git a/package.json b/package.json index 6714b5c..8de5506 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,15 @@ "echarts-liquidfill": "^3.1.0", "element-plus": "^2.1.4", "exceljs": "^4.3.0", + "file-saver": "^2.0.5", + "jszip": "^3.9.1", "mavon-editor": "^2.10.4", "md-editor-v3": "^1.11.3", "nprogress": "^0.2.0", "path-to-regexp": "^6.2.0", "print-js": "^1.6.0", "splitpanes": "^3.1.1", + "svg-sprite-loader": "^6.0.11", "vue": "^3.0.0", "vue-cropper": "^1.0.3", "vue-cropperjs": "^5.0.0", diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue new file mode 100644 index 0000000..388fa10 --- /dev/null +++ b/src/components/SvgIcon/index.vue @@ -0,0 +1,36 @@ + + + + + + diff --git a/src/icons/index.js b/src/icons/index.js new file mode 100644 index 0000000..ab1d8c4 --- /dev/null +++ b/src/icons/index.js @@ -0,0 +1,9 @@ +import Vue from 'vue' +import SvgIcon from '@/components/SvgIcon'// svg component + + +const req = require.context('./svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys().map(requireContext) +requireAll(req) + +export default SvgIcon diff --git a/src/icons/svg/borrow.svg b/src/icons/svg/borrow.svg new file mode 100644 index 0000000..81491d4 --- /dev/null +++ b/src/icons/svg/borrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/compass.svg b/src/icons/svg/compass.svg new file mode 100644 index 0000000..701c845 --- /dev/null +++ b/src/icons/svg/compass.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/dashboard.svg b/src/icons/svg/dashboard.svg new file mode 100644 index 0000000..5317d37 --- /dev/null +++ b/src/icons/svg/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/entrust.svg b/src/icons/svg/entrust.svg new file mode 100644 index 0000000..4f4ce41 --- /dev/null +++ b/src/icons/svg/entrust.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/example.svg b/src/icons/svg/example.svg new file mode 100644 index 0000000..46f42b5 --- /dev/null +++ b/src/icons/svg/example.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/eye-open.svg b/src/icons/svg/eye-open.svg new file mode 100644 index 0000000..88dcc98 --- /dev/null +++ b/src/icons/svg/eye-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/eye.svg b/src/icons/svg/eye.svg new file mode 100644 index 0000000..16ed2d8 --- /dev/null +++ b/src/icons/svg/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/form.svg b/src/icons/svg/form.svg new file mode 100644 index 0000000..dcbaa18 --- /dev/null +++ b/src/icons/svg/form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/go-out.svg b/src/icons/svg/go-out.svg new file mode 100644 index 0000000..d733ebe --- /dev/null +++ b/src/icons/svg/go-out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/home.svg b/src/icons/svg/home.svg new file mode 100644 index 0000000..9515f19 --- /dev/null +++ b/src/icons/svg/home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/horn.svg b/src/icons/svg/horn.svg new file mode 100644 index 0000000..f13708a --- /dev/null +++ b/src/icons/svg/horn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/inquiry.svg b/src/icons/svg/inquiry.svg new file mode 100644 index 0000000..43e2267 --- /dev/null +++ b/src/icons/svg/inquiry.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/link.svg b/src/icons/svg/link.svg new file mode 100644 index 0000000..48197ba --- /dev/null +++ b/src/icons/svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/nested.svg b/src/icons/svg/nested.svg new file mode 100644 index 0000000..06713a8 --- /dev/null +++ b/src/icons/svg/nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/notice.svg b/src/icons/svg/notice.svg new file mode 100644 index 0000000..7969d03 --- /dev/null +++ b/src/icons/svg/notice.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/password.svg b/src/icons/svg/password.svg new file mode 100644 index 0000000..e291d85 --- /dev/null +++ b/src/icons/svg/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/put-in.svg b/src/icons/svg/put-in.svg new file mode 100644 index 0000000..60e4e58 --- /dev/null +++ b/src/icons/svg/put-in.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/report-form.svg b/src/icons/svg/report-form.svg new file mode 100644 index 0000000..206981e --- /dev/null +++ b/src/icons/svg/report-form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/settings.svg b/src/icons/svg/settings.svg new file mode 100644 index 0000000..b93eb6b --- /dev/null +++ b/src/icons/svg/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/synchronous.svg b/src/icons/svg/synchronous.svg new file mode 100644 index 0000000..f0b541b --- /dev/null +++ b/src/icons/svg/synchronous.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/table.svg b/src/icons/svg/table.svg new file mode 100644 index 0000000..0e3dc9d --- /dev/null +++ b/src/icons/svg/table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/take-over.svg b/src/icons/svg/take-over.svg new file mode 100644 index 0000000..f7cff52 --- /dev/null +++ b/src/icons/svg/take-over.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/task.svg b/src/icons/svg/task.svg new file mode 100644 index 0000000..c7ade49 --- /dev/null +++ b/src/icons/svg/task.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/todo.svg b/src/icons/svg/todo.svg new file mode 100644 index 0000000..c07e91b --- /dev/null +++ b/src/icons/svg/todo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/tree.svg b/src/icons/svg/tree.svg new file mode 100644 index 0000000..dd4b7dd --- /dev/null +++ b/src/icons/svg/tree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/update.svg b/src/icons/svg/update.svg new file mode 100644 index 0000000..d540e3a --- /dev/null +++ b/src/icons/svg/update.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/user.svg b/src/icons/svg/user.svg new file mode 100644 index 0000000..0ba0716 --- /dev/null +++ b/src/icons/svg/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svgo.yml b/src/icons/svgo.yml new file mode 100644 index 0000000..d11906a --- /dev/null +++ b/src/icons/svgo.yml @@ -0,0 +1,22 @@ +# replace default config + +# multipass: true +# full: true + +plugins: + + # - name + # + # or: + # - name: false + # - name: true + # + # or: + # - name: + # param1: 1 + # param2: 2 + +- removeAttrs: + attrs: + - 'fill' + - 'fill-rule' diff --git a/src/main.ts b/src/main.ts index 0046852..afa9219 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,11 +4,12 @@ import router from './router' import store from './store' import './permission' +import SvgIcon from './icons/index' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' import zhCn from 'element-plus/es/locale/lang/zh-cn' const app = createApp(App) - +app.component('svg-icon',SvgIcon) import * as ElIconsModules from '@element-plus/icons-vue' // 全局注册element-plus icon图标组件 Object.keys(ElIconsModules).forEach((key) => {//循环遍历组件名称 diff --git a/src/router/index.ts b/src/router/index.ts index 8189ac1..3773913 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -64,6 +64,26 @@ const clipboardTable = { ] } +const zipRoutes = { + path: '/zip', + component: Layout, + redirect: 'noRedirect', + name: 'zip', + meta: { + title: 'Zip', + icon: 'document-copy', + roles:['other'] + }, + children: [ + { + path: 'download', + component: () => import('@/views/zip/download.vue'), + name: 'download', + meta: { title: 'download', noCache: true , roles:['other'] ,icon: 'document-copy',} + }, + + ] +} // 异步组件 export const asyncRoutes = [ @@ -73,6 +93,7 @@ export const asyncRoutes = [ componentsRouter, othersRouter, excelRouter, + zipRoutes, errorRouter, externalLink, clipboardTable, diff --git a/src/utils/downloadzip.ts b/src/utils/downloadzip.ts new file mode 100644 index 0000000..f0cc486 --- /dev/null +++ b/src/utils/downloadzip.ts @@ -0,0 +1,260 @@ + +// @ts-ignore +import {saveAs} from 'file-saver'; +import * as ExcelJs from 'exceljs'; +import {Workbook, Worksheet, Row, Cell} from 'exceljs'; +import JsZip from 'jszip' + +export interface IDownloadFiles2Zip { + // 压缩包的文件名 + zipName: string; + files: IDownloadExcel[]; +} + +export interface IDownloadFiles2ZipWithFolder { + zipName: string; + folders: IFolder[]; +} + +export interface IFolder { + folderName: string; + files: IDownloadExcel[]; +} + +export interface IDownloadExcel { + filename: string; + sheets: ISheet[]; +} + +export interface ISheet { + // sheet 的名字 + sheetName: string; + // 这个 sheet 中表格的 column,类型同 antd 的 column + columns: any[]; + // 表格的数据 + dataSource: any[]; +} + +export interface ITableHeader { + header: string; + // 用于数据匹配的 key + key: string; + // 列宽 + width: number; + // 父级的 key + parentKey?: string; + children?: ITableHeader[]; +} + +export interface IStyleAttr { + color?: string; + fontSize?: number; + horizontal?: 'fill' | 'distributed' | 'justify' | 'center' | 'left' | 'right' | 'centerContinuous' | undefined; + bold?: boolean; +} + +// 默认的列宽 +export const DEFAULT_COLUMN_WIDTH = 20; +// 默认行高 +export const DEFAULT_ROW_HEIGHT = 20; + + + +/** + * 导出多个文件为zip压缩包 + */ +export async function downloadFiles2Zip(params: IDownloadFiles2Zip) { + const zip = new JsZip(); + // 待每个文件都写入完之后再生成 zip 文件 + const promises = params?.files?.map(async param => await handleEachFile(param, zip, '')) + await Promise.all(promises); + zip.generateAsync({type: "blob"}).then(blob => { + saveAs(blob, `${params.zipName}.zip`) + }) +} + +/** + * 导出支持多级文件夹的压缩包 + * @param params + */ +export async function downloadFiles2ZipWithFolder(params: IDownloadFiles2ZipWithFolder) { + const zip = new JsZip(); + const outPromises = params?.folders?.map(async folder => await handleFolder(zip, folder)) + await Promise.all(outPromises); + zip.generateAsync({type: "blob"}).then(blob => { + saveAs(blob, `${params.zipName}.zip`) + }) +} + +async function handleFolder(zip: JsZip, folder: IFolder) { + console.log({folder}) + let folderPromises: Promise[] = []; + const promises = folder?.files?.map(async param => await handleEachFile(param, zip, folder.folderName)); + await Promise.all([...promises, ...folderPromises]); +} + +async function handleEachFile(param: IDownloadExcel, zip: JsZip, folderName: string) { + // 创建工作簿 + const workbook = new ExcelJs.Workbook(); + param?.sheets?.forEach((sheet) => handleEachSheet(workbook, sheet)); + // 生成 blob + const data = await workbook.xlsx.writeBuffer(); + const blob = new Blob([data], {type: ''}); + if (folderName) { + zip.folder(folderName)?.file(`${param.filename}.xlsx`, blob) + } else { + // 写入 zip 中一个文件 + zip.file(`${param.filename}.xlsx`, blob); + } +} + +function handleEachSheet(workbook: Workbook, sheet: ISheet) { + // 添加sheet + const worksheet = workbook.addWorksheet(sheet.sheetName); + // 设置 sheet 的默认行高。设置默认行高跟自动撑开单元格冲突 + // worksheet.properties.defaultRowHeight = 20; + // 设置列 + worksheet.columns = generateHeaders(sheet.columns); + // handleHeader(worksheet); + // handleData(worksheet, sheet); + handleDataWithRender(worksheet, sheet); +} + +export function handleHeader(worksheet: Worksheet) { + // 给表头添加背景色。因为表头是第一行,可以通过 getRow(1) 来获取表头这一行 + const headerRow = worksheet.getRow(1); + headerRow.height = 22; + // 通过 cell 设置样式,更精准 + headerRow.eachCell((cell) => addCellStyle(cell, {color: 'dff8ff', fontSize: 12, horizontal: 'left'})); +} + +export function handleData(worksheet: Worksheet, sheet: ISheet) { + // 添加行 + const rows = worksheet.addRows(sheet?.dataSource); + // 设置每行的样式 + addStyleToData(rows); +} + +/** + * 如果 column 有 render 函数,则以 render 渲染的结果显示 + * @param worksheet + * @param sheet + */ +function handleDataWithRender(worksheet: Worksheet, sheet: ISheet) { + const {dataSource, columns} = sheet; + const rowsData = dataSource?.map(data => { + return columns?.map(column => { + // @ts-ignore + const renderResult = column?.render?.(data[column.name], data); + if (renderResult) { + // 如果不是 object 说明没包裹标签,是基本类型直接返回 + if (typeof renderResult !== "object") { + return renderResult; + } + // 如果是 object 说明包裹了标签,逐级取出值 + return getValueFromRender(renderResult); + } + // @ts-ignore + return data[column.name]; + }) + }) + console.log({rowsData}) + // 添加行 + const rows = worksheet.addRows(rowsData); + // 设置每行的样式 + addStyleToData(rows); +} + +// 递归取出 render 里的值 +// @ts-ignore +function getValueFromRender(renderResult: any) { + if (renderResult?.type) { + let children = renderResult?.props?.children; + if (children?.type) { + return getValueFromRender(children); + } else { + return children; + } + } + return '' +} + +function addStyleToData(rows: Row[]) { + // 设置每行的样式 + rows?.forEach((row) => { + // 设置字体 + // eslint-disable-next-line no-param-reassign + row.font = { + size: 11, + name: '微软雅黑', + }; + // 设置对齐方式 + // eslint-disable-next-line no-param-reassign + row.alignment = { + vertical: 'middle', + horizontal: 'left', + wrapText: true, + }; + }); +} + +export function saveWorkbook(workbook: Workbook, fileName: string) { + // 导出文件 + workbook.xlsx.writeBuffer().then((data: any) => { + const blob = new Blob([data], {type: ''}); + saveAs(blob, fileName); + }); +} + +// 根据 antd 的 column 生成 exceljs 的 column +export function generateHeaders(columns: any[]) { + return columns?.map((col) => { + const obj: ITableHeader = { + // 显示的 name + header: col.label, + // 用于数据匹配的 key + key: col.name, + // 列宽 + width: col.width / 5 > DEFAULT_COLUMN_WIDTH ? col.width / 5 : DEFAULT_COLUMN_WIDTH, + }; + if (col.children) { + obj.children = col.children?.map((item: any) => ({ + key: item.name, + header: item.label, + width: item.width, + parentKey: col.name, + })); + } + return obj; + }); +} + +export function getColumnNumber(width: number) { + // 需要的列数,向上取整 + return Math.ceil(width / DEFAULT_COLUMN_WIDTH); +} + +export function addCellStyle(cell: Cell, attr?: IStyleAttr) { + const {color, fontSize, horizontal, bold} = attr || {}; + // eslint-disable-next-line no-param-reassign + cell.fill = { + type: 'pattern', + pattern: 'solid', + fgColor: {argb: color}, + }; + // eslint-disable-next-line no-param-reassign + cell.font = { + bold: bold ?? true, + size: fontSize ?? 11, + name: '微软雅黑', + }; + // eslint-disable-next-line no-param-reassign + cell.alignment = {vertical: 'middle', wrapText: true, horizontal: horizontal ?? 'left'}; +} + +export function addHeaderStyle(row: Row, attr?: IStyleAttr) { + // eslint-disable-next-line no-param-reassign + row.height = DEFAULT_ROW_HEIGHT; + row.eachCell((cell) => addCellStyle(cell, attr)); +} + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 7d4b34f..fadcfa0 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -8,20 +8,36 @@ - + + + + :type="passwordType" + > + + + () const router = useRouter() const store = useStore() @@ -68,7 +84,14 @@ password: [{ validator: validatePass, trigger: 'blur' }], username: [{ validator: validateUsername, trigger: 'blur' }], }) - + const passwordType = ref('password') + const showPwd = ()=> { + if (passwordType.value === 'password') { + passwordType.value = '' + } else { + passwordType.value = 'password' + } + } const submitForm = (formEl: FormInstance | undefined) => { if (!formEl) return formEl.validate(async (valid) => { @@ -76,6 +99,7 @@ if (valid) { // 登录 await store.dispatch('user/login',ruleForm) + ElMessage.success('登录成功') router.push({ path:'/' }) @@ -88,6 +112,7 @@ diff --git a/vue.config.js b/vue.config.js index 7ed1aef..a0f3df6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,3 +1,22 @@ +const path = require('path') + +function resolve(dir) { + return path.join(__dirname, '.', dir) +} module.exports = { - publicPath: "./" + publicPath: "./", + chainWebpack: config => { + config.module.rules.delete("svg"); // 重点:删除默认配置中处理svg, + config.module + .rule('svg-sprite-loader') + .test(/\.svg$/) + .include + .add(resolve('src/icons')) // 处理svg目录 + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + }, }; diff --git a/yarn.lock b/yarn.lock index 8b6bd2a..0a4fe2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2244,7 +2244,7 @@ bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" -bluebird@^3.1.1, bluebird@^3.5.5: +bluebird@^3.1.1, bluebird@^3.5.0, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -2312,7 +2312,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^2.3.1, braces@^2.3.2: +braces@^2.2.2, braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -2830,6 +2830,11 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= +clone@^2.1.1: + version "2.1.2" + resolved "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + coa@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" @@ -3445,6 +3450,11 @@ deep-equal@^1.0.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" +deepmerge@1.3.2: + version "1.3.2" + resolved "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.3.2.tgz#1663691629d4dbfe364fa12a2a4f0aa86aa3a050" + integrity sha512-qjMjTrk+RKv/sp4RPDpV5CnKhxjFI9p+GkLBOls5A8EEElldYWCWA9zceAkmfd0xIo2aU1nxiaLFoiya2sb6Cg== + deepmerge@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" @@ -3622,7 +3632,7 @@ domain-browser@^1.1.1: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== -domelementtype@1: +domelementtype@1, domelementtype@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== @@ -3632,6 +3642,13 @@ domelementtype@^2.0.1, domelementtype@^2.2.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.npmmirror.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.0: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" @@ -3639,7 +3656,12 @@ domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.0: dependencies: domelementtype "^2.2.0" -domutils@^1.7.0: +domready@1.0.8: + version "1.0.8" + resolved "https://registry.npmmirror.com/domready/-/domready-1.0.8.tgz#91f252e597b65af77e745ae24dd0185d5e26d58c" + integrity sha512-uIzsOJUNk+AdGE9a6VDeessoMCzF8RrZvJCX/W8QtyfgdR6Uofn/MvRonih3OtCO79b2VDzDOymuiABrQ4z3XA== + +domutils@^1.5.1, domutils@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== @@ -3813,6 +3835,11 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.npmmirror.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -3884,7 +3911,7 @@ escape-html@^1.0.3, escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -4090,7 +4117,7 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -extglob@^2.0.4: +extglob@^2.0.2, extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== @@ -4164,6 +4191,11 @@ file-loader@^4.2.0: loader-utils "^1.2.3" schema-utils "^2.5.0" +file-saver@^2.0.5: + version "2.0.5" + resolved "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz#d61cfe2ce059f414d899e9dd6d4107ee25670c38" + integrity sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA== + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" @@ -4601,6 +4633,11 @@ has-bigints@^1.0.1: resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -4688,7 +4725,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -he@1.2.x: +he@1.2.x, he@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -4783,6 +4820,18 @@ html-webpack-plugin@^3.2.0: toposort "^1.0.0" util.promisify "1.0.0" +htmlparser2@^3.8.3: + version "3.10.1" + resolved "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + htmlparser2@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" @@ -4907,6 +4956,11 @@ ignore@^4.0.3: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +image-size@^0.5.1: + version "0.5.5" + resolved "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -5270,7 +5324,7 @@ is-path-inside@^2.1.0: dependencies: path-is-inside "^1.0.2" -is-plain-obj@^1.0.0: +is-plain-obj@^1.0.0, is-plain-obj@^1.1: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= @@ -5368,7 +5422,7 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isobject@^2.0.0: +isobject@^2.0.0, isobject@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= @@ -5390,6 +5444,11 @@ javascript-stringify@^2.0.1: resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-2.1.0.tgz#27c76539be14d8bd128219a2d731b09337904e79" integrity sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg== +js-base64@^2.1.9: + version "2.6.4" + resolved "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" + integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== + js-binary-schema-parser@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz#3d7848748e8586e63b34e8911b643f59cfb6396e" @@ -5508,7 +5567,7 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -jszip@^3.5.0: +jszip@^3.5.0, jszip@^3.9.1: version "3.9.1" resolved "https://registry.npmmirror.com/jszip/-/jszip-3.9.1.tgz#784e87f328450d1e8151003a9c67733e2b901051" integrity sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw== @@ -5537,7 +5596,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== @@ -5886,6 +5945,13 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-options@1.0.1: + version "1.0.1" + resolved "https://registry.npmmirror.com/merge-options/-/merge-options-1.0.1.tgz#2a64b24457becd4e4dc608283247e94ce589aa32" + integrity sha512-iuPV41VWKWBIOpBsjoxjDZw8/GbSfZ2mk7N1453bwMrfzdrIk7EzBd+8UVR6rkw67th7xnk9Dytl3J+lHPdxvg== + dependencies: + is-plain-obj "^1.1" + merge-source-map@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" @@ -5913,6 +5979,25 @@ microevent.ts@~0.1.1: resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== +micromatch@3.1.0: + version "3.1.0" + resolved "https://registry.npmmirror.com/micromatch/-/micromatch-3.1.0.tgz#5102d4eaf20b6997d6008e3acfe1c44a3fa815e2" + integrity sha512-3StSelAE+hnRvMs8IdVW7Uhk8CVed5tp+kLLGlBP6WiRAXS21GPGu/Nat4WNPXj2Eoc24B02SaeoyozPMfj0/g== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.2.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + extglob "^2.0.2" + fragment-cache "^0.2.1" + kind-of "^5.0.2" + nanomatch "^1.2.1" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -6047,6 +6132,11 @@ mississippi@^3.0.0: stream-each "^1.1.0" through2 "^2.0.0" +mitt@1.1.2: + version "1.1.2" + resolved "https://registry.npmmirror.com/mitt/-/mitt-1.1.2.tgz#380e61480d6a615b660f07abb60d51e0a4e4bed6" + integrity sha512-3btxP0O9iGADGWAkteQ8mzDtEspZqu4I32y4GZYCV5BrwtzdcRpF4dQgNdJadCrbBx7Lu6Sq9AVrerMHR0Hkmw== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -6128,7 +6218,7 @@ nanoid@^3.3.1: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== -nanomatch@^1.2.9: +nanomatch@^1.2.1, nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== @@ -7026,6 +7116,11 @@ postcss-ordered-values@^4.1.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-prefix-selector@^1.6.0: + version "1.15.0" + resolved "https://registry.npmmirror.com/postcss-prefix-selector/-/postcss-prefix-selector-1.15.0.tgz#b35f63d414954e59d9331071c6a3bb17369ee7bf" + integrity sha512-9taaTPs6I4906QC03zBBt0LfTWAhrqEWlKSj0jRlxrg1yV+O91h0wcquu6krcA5L6aEv3QnCeG8B1vZ5WT4ecQ== + postcss-reduce-initial@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" @@ -7091,6 +7186,16 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== +postcss@^5.2.17: + version "5.2.18" + resolved "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" + integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg== + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: version "7.0.39" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" @@ -7108,6 +7213,44 @@ postcss@^8.1.10: picocolors "^1.0.0" source-map-js "^1.0.2" +posthtml-parser@^0.2.0, posthtml-parser@^0.2.1: + version "0.2.1" + resolved "https://registry.npmmirror.com/posthtml-parser/-/posthtml-parser-0.2.1.tgz#35d530de386740c2ba24ff2eb2faf39ccdf271dd" + integrity sha512-nPC53YMqJnc/+1x4fRYFfm81KV2V+G9NZY+hTohpYg64Ay7NemWWcV4UWuy/SgMupqQ3kJ88M/iRfZmSnxT+pw== + dependencies: + htmlparser2 "^3.8.3" + isobject "^2.1.0" + +posthtml-rename-id@^1.0: + version "1.0.12" + resolved "https://registry.npmmirror.com/posthtml-rename-id/-/posthtml-rename-id-1.0.12.tgz#cf7f6eb37146bf1afac31e68f18c6cc19ae61433" + integrity sha512-UKXf9OF/no8WZo9edRzvuMenb6AD5hDLzIepJW+a4oJT+T/Lx7vfMYWT4aWlGNQh0WMhnUx1ipN9OkZ9q+ddEw== + dependencies: + escape-string-regexp "1.0.5" + +posthtml-render@^1.0.5, posthtml-render@^1.0.6: + version "1.4.0" + resolved "https://registry.npmmirror.com/posthtml-render/-/posthtml-render-1.4.0.tgz#40114070c45881cacb93347dae3eff53afbcff13" + integrity sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw== + +posthtml-svg-mode@^1.0.3: + version "1.0.3" + resolved "https://registry.npmmirror.com/posthtml-svg-mode/-/posthtml-svg-mode-1.0.3.tgz#abd554face81223cab0cb367e18e4efd2a4e74b0" + integrity sha512-hEqw9NHZ9YgJ2/0G7CECOeuLQKZi8HjWLkBaSVtOWjygQ9ZD8P7tqeowYs7WrFdKsWEKG7o+IlsPY8jrr0CJpQ== + dependencies: + merge-options "1.0.1" + posthtml "^0.9.2" + posthtml-parser "^0.2.1" + posthtml-render "^1.0.6" + +posthtml@^0.9.2: + version "0.9.2" + resolved "https://registry.npmmirror.com/posthtml/-/posthtml-0.9.2.tgz#f4c06db9f67b61fd17c4e256e7e3d9515bf726fd" + integrity sha512-spBB5sgC4cv2YcW03f/IAUN1pgDJWNWD8FzkyY4mArLUMJW+KlQhlmUdKAHQuPfb00Jl5xIfImeOsf6YL8QK7Q== + dependencies: + posthtml-parser "^0.2.0" + posthtml-render "^1.0.5" + prepend-http@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -7236,7 +7379,7 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -query-string@^4.1.0: +query-string@^4.1.0, query-string@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s= @@ -8244,6 +8387,13 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.npmmirror.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== + dependencies: + has-flag "^1.0.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8270,6 +8420,48 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +svg-baker-runtime@^1.4.7: + version "1.4.7" + resolved "https://registry.npmmirror.com/svg-baker-runtime/-/svg-baker-runtime-1.4.7.tgz#f4720637f5b6202eef6378d81f1fead0815f8a4e" + integrity sha512-Zorfwwj5+lWjk/oxwSMsRdS2sPQQdTmmsvaSpzU+i9ZWi3zugHLt6VckWfnswphQP0LmOel3nggpF5nETbt6xw== + dependencies: + deepmerge "1.3.2" + mitt "1.1.2" + svg-baker "^1.7.0" + +svg-baker@^1.5.0, svg-baker@^1.7.0: + version "1.7.0" + resolved "https://registry.npmmirror.com/svg-baker/-/svg-baker-1.7.0.tgz#8367f78d875550c52fe4756f7303d5c5d7c2e9a7" + integrity sha512-nibslMbkXOIkqKVrfcncwha45f97fGuAOn1G99YwnwTj8kF9YiM6XexPcUso97NxOm6GsP0SIvYVIosBis1xLg== + dependencies: + bluebird "^3.5.0" + clone "^2.1.1" + he "^1.1.1" + image-size "^0.5.1" + loader-utils "^1.1.0" + merge-options "1.0.1" + micromatch "3.1.0" + postcss "^5.2.17" + postcss-prefix-selector "^1.6.0" + posthtml-rename-id "^1.0" + posthtml-svg-mode "^1.0.3" + query-string "^4.3.2" + traverse "^0.6.6" + +svg-sprite-loader@^6.0.11: + version "6.0.11" + resolved "https://registry.npmmirror.com/svg-sprite-loader/-/svg-sprite-loader-6.0.11.tgz#a4d60cee3d74232a2c17d31c73a2008295f61220" + integrity sha512-TedsTf8wsHH6HgdwKjUveDZRC6q5gPloYV8A8/zZaRWP929J7x6TzQ6MvZFl+YYDJuJ0Akyuu/vNVJ+fbPuYXg== + dependencies: + bluebird "^3.5.0" + deepmerge "1.3.2" + domready "1.0.8" + escape-string-regexp "1.0.5" + loader-utils "^1.1.0" + svg-baker "^1.5.0" + svg-baker-runtime "^1.4.7" + url-slug "2.0.0" + svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" @@ -8464,6 +8656,11 @@ tough-cookie@~2.5.0: resolved "https://registry.npmmirror.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" integrity sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ== +traverse@^0.6.6: + version "0.6.6" + resolved "https://registry.npmmirror.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" + integrity sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw== + tryer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" @@ -8607,6 +8804,11 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== +unidecode@0.1.8: + version "0.1.8" + resolved "https://registry.npmmirror.com/unidecode/-/unidecode-0.1.8.tgz#efbb301538bc45246a9ac8c559d72f015305053e" + integrity sha512-SdoZNxCWpN2tXTCrGkPF/0rL2HEq+i2gwRG1ReBvx8/0yTzC3enHfugOf8A9JBShVwwrRIkLX0YcDUGbzjbVCA== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -8724,6 +8926,13 @@ url-parse@^1.4.3, url-parse@^1.5.10: querystringify "^2.1.1" requires-port "^1.0.0" +url-slug@2.0.0: + version "2.0.0" + resolved "https://registry.npmmirror.com/url-slug/-/url-slug-2.0.0.tgz#a789d5aed4995c0d95af33377ad1d5c68d4d7027" + integrity sha512-aiNmSsVgrjCiJ2+KWPferjT46YFKoE8i0YX04BlMVDue022Xwhg/zYlnZ6V9/mP3p8Wj7LEp0myiTkC/p6sxew== + dependencies: + unidecode "0.1.8" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"