Tweaks for setup script

This commit is contained in:
Brenden Harrell committed 2021-05-19 15:23:17 -05:00
1 parent 4b32d7c30a
commit a337f6f4c0
1 file changed
+23 -18
+23 -18
View File
@@ -9,7 +9,7 @@ let nodeModulesDirs = [
path.join( process.cwd(), "Projects", "Superalgos", "TS", "Bot-Modules", "Trading-Bot", "Announcements"),
path.join( process.cwd(), "Projects", "Superalgos", "TS", "Bot-Modules", "Trading-Bot", "Low-Frequency-Trading", "APIs"),
path.join( process.cwd(), "Projects", "Superalgos", "TS", "Task-Modules"),
path.join( process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules")
path.join( process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning")
];
console.log('');
@@ -18,32 +18,37 @@ console.log('');
console.log(nodeModulesDirs);
console.log('');
// Loop through directories and run node ci in a child process shell.
let dir;
let ifError;
for (dir in nodeModulesDirs) {
let command = "npm ci";
// Loop through directories and run node ci in a child process shell.
let command = "echo Results of install at "+ nodeModulesDirs[dir] + " & npm ci";
exec( command,
{
cwd: nodeModulesDirs[dir]
},
function ( error, stdout, stderr ){
function ( error, stdout ){
if (error) {
console.log("there was an error: ", error);
console.log('');
console.log("There was an error installing some dependencies error: ");
console.log('');
console.log( error );
ifError = true;
return;
}
console.log( "Results of install at " + nodeModulesDirs[dir] );
console.log('');
console.log( stdout );
});
};
/*
cd %~dp0
cd ..
cd %%a
cmd /k "npm ci"
))
REM cmd /k "cd %~dp0 && cd .."
REM cmd /k "npm ci && cd %~dp0"
REM cmd /k "npm ci"
*/
// Print closing message
if (dir == nodeModulesDirs.length) {
if ( ifError = true ) {
console.log('');
console.log("Installation of node dependencies finished with errors. See error messages above.")
} else {
console.log('');
console.log("Node dependencies installed successfully!")
}
}
};