@minkimcello/georgia
Advanced tools
Comparing version 1.12.30 to 1.12.31
@@ -22,2 +22,3 @@ #!/usr/bin/env node | ||
function setYarn() { | ||
console.log('setyarn'); | ||
return new Promise((resolve, _) => { | ||
@@ -38,2 +39,3 @@ if ( | ||
function populate() { | ||
console.log('populate'); | ||
return new Promise(async (resolve, reject) => { | ||
@@ -56,18 +58,2 @@ if (fs.existsSync(BIGTEST_DIR)) { | ||
); | ||
console.log('first install') | ||
await install(true); | ||
rmrf.sync(`${BIGTEST_DIR}/package.json`); | ||
const lockfile = yarn ? 'yarn.lock' : 'package-lock.json'; | ||
rmrf.sync(`${BIGTEST_DIR}/${lockfile}`); | ||
const hard_list = ['cypress/', 'public/', 'src/', 'bigtest.json', 'cypress.json', 'package.json']; | ||
hard_list.forEach(async file => { | ||
if(file==='package.json'){ | ||
await ncp(`${DELETE_ME_L8R}/bin/${file}`, `${BIGTEST_DIR}/${file}`) | ||
} else { | ||
await ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`); | ||
} | ||
}); | ||
console.log('end of populate()') | ||
resolve(); | ||
@@ -78,8 +64,23 @@ }; | ||
function install(x) { | ||
if(x){ | ||
console.log('first installation proceeding') | ||
} else { | ||
console.log('second installation procceeding') | ||
} | ||
function migrate() { | ||
console.log('migrate'); | ||
return new Promise((resolve, _) => { | ||
rmrf.sync(`${BIGTEST_DIR}/package.json`); | ||
const lockfile = yarn ? 'yarn.lock' : 'package-lock.json'; | ||
rmrf.sync(`${BIGTEST_DIR}/${lockfile}`); | ||
const hard_list = ['cypress/', 'public/', 'src/', 'bigtest.json', 'cypress.json', 'package.json']; | ||
hard_list.forEach(async file => { | ||
if(file==='package.json'){ | ||
await ncp(`${DELETE_ME_L8R}/bin/${file}`, `${BIGTEST_DIR}/${file}`) | ||
} else { | ||
await ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`); | ||
} | ||
}); | ||
resolve(); | ||
}) | ||
} | ||
function install() { | ||
return new Promise((resolve, reject) => { | ||
@@ -92,6 +93,6 @@ let command = yarn ? 'yarn' : 'npm'; | ||
install.on('close', () => { | ||
if(x){ | ||
if(x===1){ | ||
console.log('first installation complete') | ||
resolve(); | ||
} else { | ||
} else if (x===2) { | ||
console.log(`second installation complete`); | ||
@@ -117,3 +118,5 @@ console.log(`'cd ${BIGTEST_DIR}' and try it out`); | ||
populate(), | ||
install() | ||
install(1), | ||
migrate(), | ||
install(2) | ||
]).catch(e => { | ||
@@ -120,0 +123,0 @@ cleanup(e); |
{ | ||
"name": "@minkimcello/georgia", | ||
"version": "1.12.30", | ||
"version": "1.12.31", | ||
"description": "BigTest Sample App", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/thefrontside/bigtest.git", |
25197
708601