mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-24 10:33:47 +08:00
23 lines
595 B
TypeScript
23 lines
595 B
TypeScript
// Build gzip after packaging
|
|
// import { readFile, writeFile } from 'fs';
|
|
import viteConfig from '../../vite.config';
|
|
import {
|
|
// basename,
|
|
join,
|
|
} from 'path';
|
|
// import { promisify } from 'util';
|
|
// import { gzip, ZlibOptions } from 'zlib';
|
|
import { readAllFile } from '../utils';
|
|
|
|
// const readFilePromise = promisify(readFile);
|
|
// const writeFilePromise = promisify(writeFile);
|
|
|
|
// function createGzip() {}
|
|
|
|
const FILE_REG = /\.(js|mjs|json|css|html)$/;
|
|
|
|
const OUT_DIR = viteConfig.outDir || 'dist';
|
|
|
|
// TODO 待开发
|
|
const files = readAllFile(join(process.cwd(), OUT_DIR), FILE_REG);
|