Skip to content

Commit

Permalink
Merge branch 'master' of github.ibm.com:WH-GovSPM/Custom-UI-Reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Caio-Bessa committed Nov 17, 2020
2 parents 8984668 + 0dc8358 commit 1c28420
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const JS_FILES_PATTERN = "/**/*.js";
const EJB_SERVER = "EJBServer";
const WEB_CLIENT = "webclient";
const TEMP_DIR = path.join(__dirname, "results", "temp")
let filesCounter = 0;


let configurations;
Expand All @@ -35,7 +36,7 @@ function createProgressBar() {
return new cliProgress.SingleBar(
{
format:
" |- Searching for artefacts in the components files: {percentage}%" +
" |- Progress: {percentage}%" +
" - " +
"|| {bar} ||",
fps: 5,
Expand All @@ -53,6 +54,7 @@ const copyFileToResultsDir = async function (files, baseDir) {
);
const fileExists = await fs.pathExists(resultsFilePath)
if (!fileExists) {
filesCounter++;
await fs.copy(file, resultsFilePath);
}
})
Expand Down Expand Up @@ -114,8 +116,9 @@ function createZipFile() {
// 'close' event is fired only when a file descriptor is involved
output.on("close", function () {
progressBarCli.increment();
console.log(archive.pointer() + " total bytes");
console.log(`zip file archive ${zipFullPath} `);
progressBarCli.stop();
console.log(`\n ${filesCounter} files found. Generating a zip file. \n`)
console.log(` Zip file created: ${zipFullPath} `);
resolve();
});

Expand Down Expand Up @@ -144,6 +147,7 @@ const run = async () => {
const { ejbServerComponents, webClientComponents } = configurations;
// EjbServer
var start = new Date();
console.log("Searching for custom UI files - JavaScript, CSS and Domain Java Renderers`) \n");

createResultsDirectory();

Expand All @@ -166,6 +170,7 @@ const run = async () => {

progressBarCli.stop();
} catch (error) {
progressBarCli.stop();
console.log(error);
}
};
Expand Down

0 comments on commit 1c28420

Please sign in to comment.