ソースを参照

fix(Builder): fix exclusion of packed app building

Evshiron Magicka 8 年 前
コミット
dba64401e9
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      src/lib/Builder.ts

+ 2 - 2
src/lib/Builder.ts

@@ -387,7 +387,7 @@ export class Builder {
 
         debug('in copyFiles', 'ignore', ignore);
 
-        const files = await globby(config.files, {
+        const files: string[] = await globby(config.files, {
             cwd: this.dir,
             // TODO: https://github.com/isaacs/node-glob#options, warn for cyclic links.
             follow: true,
@@ -409,7 +409,7 @@ export class Builder {
                     postfix: '.zip',
                 });
 
-                await compress(this.dir, files, 'zip', nwFile);
+                await compress(this.dir, files.filter((file) => !file.endsWith('/')), 'zip', nwFile);
 
                 const { path: tempDir } = await tmpDir();
                 await this.writeStrippedManifest(resolve(tempDir, 'package.json'), pkg, config);