Skip to content

Commit

Permalink
fix(ci): add hotfix in built package.json to use proper file patterns…
Browse files Browse the repository at this point in the history
… in "files"

You can read more here: #405
  • Loading branch information
oscard0m committed Mar 2, 2023
1 parent 20c6ad2 commit c29fe31
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/fix-package-json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const fs = require("fs");
const path = require("path");

const pkgPath = path.join(__dirname, "../pkg/package.json");
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));

pkg.files = pkg.files.map((file) => {
if (file.endsWith("/")) {
return file + "**";
}
return file;
});

fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), "utf8");

0 comments on commit c29fe31

Please sign in to comment.