@minkimcello/georgia
Advanced tools
Comparing version 1.12.40 to 1.12.41
#!/usr/bin/env node | ||
// const chalk = require('chalk'); | ||
const spawn = require('child_process').spawn; | ||
const spawn = require('cross-spawn'); | ||
const fs = require('fs'); | ||
const rmrf = require('rimraf'); | ||
@@ -56,4 +57,4 @@ const BIGTEST_DIR = 'bs'; | ||
const lockfile = yarn ? 'yarn.lock' : 'package-lock.json'; | ||
fs.rmSync(`${BIGTEST_DIR}/${lockfile}`); | ||
fs.rmSync(`${BIGTEST_DIR}/package.json`); | ||
rmrf.sync(`${BIGTEST_DIR}/${lockfile}`); | ||
rmrf.sync(`${BIGTEST_DIR}/package.json`); | ||
@@ -69,3 +70,3 @@ const hard_list = ['cypress/', 'public/', 'src/', 'bigtest.json', 'cypress.json', 'package.json']; | ||
fs.rmdirSync(`${BIGTEST_DIR}/node_modules/`); | ||
rmrf.sync(`${BIGTEST_DIR}/node_modules/`); | ||
resolve(); | ||
@@ -78,17 +79,22 @@ }) | ||
let command = yarn ? 'yarn' : 'npm'; | ||
spawn(command, ['install'], { | ||
const install = spawn(command, ['install'], { | ||
cwd: BIGTEST_DIR, | ||
stdio: 'inherit' | ||
}); | ||
console.log('finished installing') | ||
resolve(); | ||
install.on('close', code => { | ||
if (code !== 0) { | ||
reject('did not install successfully'); | ||
return; | ||
} | ||
resolve(); | ||
}); | ||
}); | ||
}; | ||
// function cleanup(e) { | ||
// console.log('Aborting because', e); | ||
// fs.rmdirSync(BIGTEST_DIR); | ||
// console.log('Deleted generated files.'); | ||
// process.exit(1); | ||
// }; | ||
function cleanup(e) { | ||
console.log('Aborting because', e); | ||
fs.rmdirSync(BIGTEST_DIR); | ||
console.log('Deleted generated files.'); | ||
process.exit(1); | ||
}; | ||
@@ -98,7 +104,7 @@ function run() { | ||
populate(); | ||
install(); | ||
install().catch(e => cleanup(e)); | ||
migrate(); | ||
install(); | ||
install().catch(e => cleanup(e)); | ||
}; | ||
run(); |
{ | ||
"name": "@minkimcello/georgia", | ||
"version": "1.12.40", | ||
"version": "1.12.41", | ||
"description": "BigTest Sample App", | ||
@@ -27,2 +27,3 @@ "repository": "https://github.com/thefrontside/bigtest.git", | ||
"bigtest": "^0.5.0", | ||
"cross-spawn": "^7.0.3", | ||
"cypress": "^6.0.1", | ||
@@ -29,0 +30,0 @@ "eslint-plugin-cypress": "^2.11.2", |
707994
42
25167
23
8
58