Skip to content

Commit

Permalink
Merge pull request #48 from scramjetorg/fix/release-assets-3
Browse files Browse the repository at this point in the history
Fix faulty release assets attempt #3
  • Loading branch information
karoltylenda authored Feb 5, 2024
2 parents a4704ee + f24419b commit 4068318
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/lib/pre-pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { join } = require("path");

class PrePack {
LICENSE_FILENAME = "LICENSE";
NODE_MODULES = "node_modules";

constructor(options) {
this.logs = [];
Expand Down Expand Up @@ -155,6 +156,11 @@ class PrePack {
if (await this.isReadable(path.join(this.currDir, "README.md"))) {
copies.push(this.copyToDist(this.currDir, "README.md"));
}

if (await this.isReadable(path.join(this.currDir, this.NODE_MODULES))) {
copies.push(this.copyToDist(this.currDir, this.NODE_MODULES));
}

await Promise.all(copies);
await this.copy(this.currDirDist, this.rootDistPackPath);
}
Expand All @@ -175,7 +181,7 @@ class PrePack {
}

async copy(input, output) {
this.log(`Copy files from ${input} to ${output}`);
console.log(`Copy files from ${input} to ${output}`);

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

0 comments on commit 4068318

Please sign in to comment.