@taole/deploy-helper 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/archive.mjs +2 -4
  2. package/package.json +1 -1
package/lib/archive.mjs CHANGED
@@ -42,7 +42,7 @@ export function genProjectArchiveBuffer(distPath) {
42
42
 
43
43
  /**
44
44
  * lib 类型 CDN 打包:若 dist 内仅有名为 version 的子目录则原样打包;
45
- * 若无子目录则为 zip 内所有文件加上 version 前缀。
45
+ * 否则为 zip 内所有文件加上 version 前缀。
46
46
  */
47
47
  export function genLibArchiveBuffer(distPath, version) {
48
48
  const subdirs = fs
@@ -52,10 +52,8 @@ export function genLibArchiveBuffer(distPath, version) {
52
52
  return archiveToBuffer((archive) => {
53
53
  if (subdirs.length === 1 && subdirs[0].name === version) {
54
54
  archive.directory(distPath, false);
55
- } else if (subdirs.length === 0) {
56
- appendDirToArchive(archive, distPath, version);
57
55
  } else {
58
- archive.directory(distPath, false);
56
+ appendDirToArchive(archive, distPath, version);
59
57
  }
60
58
  });
61
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/deploy-helper",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "脚本部署工具,用于将项目部署到测试环境或生产环境",
5
5
  "main": "index.mjs",
6
6
  "type": "module",