Skip to content
Snippets Groups Projects
Commit 38771f07 authored by Josefine Wegert's avatar Josefine Wegert
Browse files

minor changes:console.logs removed,..

parent f9ebe566
No related branches found
No related tags found
No related merge requests found
...@@ -35,16 +35,6 @@ app.use(bodyParser.json()); ...@@ -35,16 +35,6 @@ app.use(bodyParser.json());
//TODO add spinner for telling user to wait until initialization is done //TODO add spinner for telling user to wait until initialization is done
//TODO clone the git repos: function initialize here (for better understanding) or in gitRepos.js defined?
//Clone the git repos initially for performance.
// function initialize(downloadFiles){
// return initGitRepos.initBackend(downloadFiles).then(function(downloadFiles){
// return initGitRepos.initBackendPlugins(downloadFiles).then(function(downloadFiles){
// return initGitRepos.initFrontend(downloadFiles)
// })
// })
// };
//initGitRepos.initialize(downloadFiles); //initGitRepos.initialize(downloadFiles);
//routes //routes
...@@ -112,7 +102,7 @@ app.use(bodyParser.json()); ...@@ -112,7 +102,7 @@ app.use(bodyParser.json());
function frontendAll() { function frontendAll() {
return frontendFunctions.frontendClean(fileName).then(function(){ return frontendFunctions.frontendClean(fileName).then(function(){
return frontendFunctions.frontendPull(fileName).then(function(){ return frontendFunctions.frontendPull(fileName).then(function(){
return frontendFunctions.frontendInstallAddons(checkedFiles, downloadFiles).then(function(){ return frontendFunctions.frontendInstallAddons(fileName, checkedFiles, downloadFiles).then(function(){
return frontendFunctions.frontendBuild(fileName) return frontendFunctions.frontendBuild(fileName)
}) })
}) })
...@@ -138,13 +128,11 @@ zip.file("README.txt", "text for README"); ...@@ -138,13 +128,11 @@ zip.file("README.txt", "text for README");
let finishedArray=[]; let finishedArray=[];
function streamFilesToZip(){ function streamFilesToZip(){
console.log('in streamFilesToZip');
return new Promise((resolve,reject)=> { return new Promise((resolve,reject)=> {
Promise.all(promiseArray).then(files => { Promise.all(promiseArray).then(files => {
console.log('in Promise.all, files:', files);
files.forEach(file => { files.forEach(file => {
if (file.zipFileName === 'backend.war'){ if (file.zipFileName === 'backend.war'){
...@@ -164,8 +152,6 @@ function streamFilesToZip(){ ...@@ -164,8 +152,6 @@ function streamFilesToZip(){
function addBackendToZip(data){ function addBackendToZip(data){
return new Promise(function(resolve,reject){ return new Promise(function(resolve,reject){
zip.file(file.zipFileName, data); zip.file(file.zipFileName, data);
console.log('zip in addBackendToZip:', zip);
console.log('finishedArray in backend:', finishedArray);
resolve(); resolve();
}) })
} }
...@@ -195,7 +181,6 @@ function streamFilesToZip(){ ...@@ -195,7 +181,6 @@ function streamFilesToZip(){
} }
}).on('finish', function(){ }).on('finish', function(){
console.log('zip in frontend:', zip);
finishedArray.push('frontend finished'); finishedArray.push('frontend finished');
if(finishedArray.length === promiseArray.length){ if(finishedArray.length === promiseArray.length){
resolve(zip); resolve(zip);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment