Skip to content

Commit

Permalink
remove legacy index file path from copying files script
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed May 17, 2024
1 parent a62bee9 commit 1756fdf
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions scripts/copyFiles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ async function addLicense(packageData) {
*/
`;
await Promise.all(
['./index.js', './legacy/index.js', './modern/index.js', './node/index.js'].map(
async (file) => {
try {
await prepend(path.resolve(buildPath, file), license);
} catch (err) {
if (err.code === 'ENOENT') {
console.log(`Skipped license for ${file}`);
} else {
throw err;
}
['./index.js', './modern/index.js', './node/index.js'].map(async (file) => {
try {
await prepend(path.resolve(buildPath, file), license);
} catch (err) {
if (err.code === 'ENOENT') {
console.log(`Skipped license for ${file}`);
} else {
throw err;
}
},
),
}
}),
);
}

Expand Down

0 comments on commit 1756fdf

Please sign in to comment.