Skip to content

Commit f867869

Browse files
committed
removing unit tests from application packaging
1 parent 6081eda commit f867869

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

webui/scripts/hooks/after_build.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const fsPromises = require('fs/promises');
1212
const { copyFile, lstat, mkdir, readdir } = require('fs/promises');
1313
const path = require('path');
1414

15+
const purgeLocations = [
16+
path.normalize(path.join(__dirname, '..', '..', 'web', 'test'))
17+
];
1518
const sourceDirectories = [
1619
path.normalize(path.join(__dirname, '..', '..', 'web'))
1720
// path.normalize(path.join(__dirname, '..', '..', 'staged-themes'))
@@ -21,6 +24,13 @@ const targetDirectory = path.normalize(path.join(__dirname, '..', '..', '..', 'e
2124
module.exports = function (configObj) {
2225
return new Promise(async (resolve, reject) => {
2326
console.log("Running after_build hook.");
27+
console.log('Purging unnecessary files created by the build...');
28+
for (const purgeLocation of purgeLocations) {
29+
if (fs.existsSync(purgeLocation)) {
30+
fs.rmSync(purgeLocation, { force: true, recursive: true });
31+
}
32+
}
33+
2434
if (configObj.buildType === 'release') {
2535
console.log('Consolidating files for building the release');
2636
for (const sourceDirectory of sourceDirectories) {

0 commit comments

Comments
 (0)