Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 1f9a1db

Browse files
committed
zip打包时,包含"."开头的文件
1 parent 41913a5 commit 1f9a1db

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/utils/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ function zipDir(dirPath, outputPath, ignore) {
5252
archive.pipe(output);
5353
archive.glob('**/*', {
5454
cwd: dirPath,
55-
ignore: ignore
55+
ignore: ignore,
56+
dot: true
5657
});
5758
archive.finalize();
5859
});

src/utils/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export async function zipDir(dirPath, outputPath, ignore?: string | string[]) {
4141
archive.glob('**/*', {
4242
// 目标路径
4343
cwd: dirPath,
44-
ignore: ignore
44+
ignore: ignore,
45+
dot: true
4546
})
4647
archive.finalize()
4748
})

0 commit comments

Comments
 (0)