Skip to content

Commit

Permalink
chore: add testSetup in bundling process
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxuanzhangsfdx committed Mar 12, 2024
1 parent 4e96bf0 commit 3c7e03c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/updateForBundling.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,22 @@ function updateLoadMessagesParam() {
});
}

function addTestSetupToIndex() {
const indexPath = './src/index.ts';
const testSetupExport = "export * from './testSetup';\n";
fs.readFile(indexPath, 'utf8', (err, data) => {
fs.appendFile(indexPath, testSetupExport, 'utf8', (err) => {
if (err) {
console.error(`Error appending to file: ${err}`);
} else {
console.log('Content successfully added to the file.');
}
});
});
}

// Run the update functions
updatePackageJson();
updateLoggerTs();
updateLoadMessagesParam();
addTestSetupToIndex();

0 comments on commit 3c7e03c

Please sign in to comment.