@minkimcello/georgia
Advanced tools
Comparing version 1.13.7 to 1.13.9
#!/usr/bin/env node | ||
// const chalk = require('chalk'); | ||
const chalk = require('chalk'); | ||
const spawn = require('cross-spawn'); | ||
let yarn = false; | ||
let yarn = true; | ||
function install() { | ||
function install2() { | ||
return new Promise((resolve, reject) => { | ||
let command = yarn ? 'yarn' : 'npm'; | ||
const install = spawn(command, ['install', '2>&1'], { | ||
const install = spawn(command, ['install'], { | ||
stdio: 'pipe' | ||
@@ -20,3 +20,2 @@ }); | ||
}) | ||
install.stderr.on('data', i++) | ||
install.on('close', code => { | ||
@@ -26,4 +25,5 @@ if (code !== 0) { | ||
} | ||
process.stdout.write(`\u001b[${i}A\u001b[2K`); | ||
process.stdout.write(`\u001b[${i+1}A\u001b[2K`); | ||
console.log('total i', i) | ||
console.log(chalk.blueBright('✓'), 'asdf\n'); | ||
resolve(); | ||
@@ -34,2 +34,46 @@ }); | ||
install(); | ||
function install(silent) { | ||
return new Promise((resolve, reject) => { | ||
let command = yarn ? 'yarn' : 'npm'; | ||
if(silent || !yarn){ | ||
console.log('silent') | ||
// let loading = animate(messages); | ||
// loading.start(); | ||
const install = spawn(command, ['install'], { | ||
// cwd: TARGET_DIR, | ||
stdio: 'ignore' | ||
}); | ||
install.on('close', code => { | ||
// loading.stop(); | ||
if (code !== 0) { | ||
reject('Error while installing'); | ||
} | ||
resolve(); | ||
}); | ||
} else { | ||
console.log('non-silent') | ||
let i = 0; | ||
const install = spawn(command, ['install'], { | ||
stdio: 'pipe' | ||
}); | ||
install.on('data', code => { | ||
i++; | ||
console.log(code.toString().split('\n')[0]); | ||
}); | ||
install.on('close', code => { | ||
if (code !== 0) { | ||
reject('Error while installing'); | ||
} | ||
process.stdout.write(`\u001b[${i}A\u001b[2k`); | ||
resolve(); | ||
}); | ||
} | ||
}); | ||
}; | ||
async function run(){ | ||
await install2(); | ||
console.log(chalk.blueBright('✓'), 'hello'); | ||
} | ||
run(); |
@@ -19,3 +19,3 @@ { | ||
"@testing-library/react": "^11.1.0", | ||
"bigtest": "^0.5.0", | ||
"bigtest": "^0.6.1", | ||
"cypress": "^6.0.1", | ||
@@ -22,0 +22,0 @@ "eslint-plugin-cypress": "^2.11.2", |
{ | ||
"name": "@minkimcello/georgia", | ||
"version": "1.13.7", | ||
"description": "BigTest Sample App", | ||
"repository": "https://github.com/thefrontside/bigtest.git", | ||
"author": "Frontside Engineering <engineering@frontside.com>", | ||
"version": "1.13.9", | ||
"description": "geogia", | ||
"author": "minkimcello <minkimcello@gmail.com>", | ||
"license": "MIT", | ||
@@ -26,3 +25,3 @@ "main": "index.js", | ||
"@testing-library/react": "^11.1.0", | ||
"bigtest": "^0.5.0", | ||
"bigtest": "^0.6.1", | ||
"cypress": "^6.0.1", | ||
@@ -29,0 +28,0 @@ "eslint-plugin-cypress": "^2.11.2", |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
714784
25358