Skip to content

Commit

Permalink
Format concat.js (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiennou authored Jan 31, 2025
1 parent f924117 commit 489e2ba
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions build/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ fs.readdir(path.join(__dirname, "..", "src"), function (err, files) {
return path.join("src", value);
});

Promise.all(files.map((name) => fs.promises.readFile(name)))
.then((fileContents) => {
fs.writeFileSync(
path.join(__dirname, "..", "dist", "index.d.ts"),
Buffer.concat(fileContents)
);
}, (reason) => {
Promise.all(files.map((name) => fs.promises.readFile(name))).then(
(fileContents) => {
fs.writeFileSync(path.join(__dirname, "..", "dist", "index.d.ts"), Buffer.concat(fileContents));
},
(reason) => {
console.log(reason);
});
},
);
});

0 comments on commit 489e2ba

Please sign in to comment.