/*****************************
 * TRAVIS STEPS FOR DEV BUILD
 *****************************/
require('../../bootstrap/colors');
const args  = process.argv.slice(2);
const paths = {
	showcase:   args[0],
	components: args[1]
};
const components   = require('./get-components')(paths);
const { execSync } = require('child_process');

/* CLONE COMPONENT REPOS
 ************************/
const CLONE_CMD = 'git clone --depth 1'
const cloneOpts = { cwd: paths.components };
for (const repoName of components.repoNames) {
	let cmd    = `${CLONE_CMD} ${repoName}`;
	let result = execSync(cmd, cloneOpts).toString();
	console.info(result.minor);
}

const resultX = execSync('ls -a1', cloneOpts).toString();
console.info(resultX.minor);
console.log(components);
console.log(process.cwd());

/* EXIT FOR TESTING
 *******************/
process.exit(1);
@@ -86,16 +86,19 @@
 ******/%0A
+// 
 require(
@@ -124,16 +124,16 @@
 lors');%0A
-
 const ar
@@ -326,16 +326,41 @@
 ocess');
+%0Aconsole.log(components);
 %0A%0A/* CLO
@@ -650,22 +650,16 @@
 o(result
-.minor
 );%0A%7D%0A%0Aco
@@ -714,16 +714,16 @@
 ring();%0A
+
 console.
@@ -738,39 +738,8 @@
 ultX
-.minor);%0Aconsole.log(components
 );%0Ac

test clone component repos via node