Skip to content

Commit 4068318

Browse files
authored
Merge pull request #48 from scramjetorg/fix/release-assets-3
Fix faulty release assets attempt #3
2 parents a4704ee + f24419b commit 4068318

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/lib/pre-pack.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const { join } = require("path");
88

99
class PrePack {
1010
LICENSE_FILENAME = "LICENSE";
11+
NODE_MODULES = "node_modules";
1112

1213
constructor(options) {
1314
this.logs = [];
@@ -155,6 +156,11 @@ class PrePack {
155156
if (await this.isReadable(path.join(this.currDir, "README.md"))) {
156157
copies.push(this.copyToDist(this.currDir, "README.md"));
157158
}
159+
160+
if (await this.isReadable(path.join(this.currDir, this.NODE_MODULES))) {
161+
copies.push(this.copyToDist(this.currDir, this.NODE_MODULES));
162+
}
163+
158164
await Promise.all(copies);
159165
await this.copy(this.currDirDist, this.rootDistPackPath);
160166
}
@@ -175,7 +181,7 @@ class PrePack {
175181
}
176182

177183
async copy(input, output) {
178-
this.log(`Copy files from ${input} to ${output}`);
184+
console.log(`Copy files from ${input} to ${output}`);
179185

180186
return fse.copy(input, output, { recursive: true })
181187
.catch(err => {

0 commit comments

Comments
 (0)