@minkimcello/georgia
Advanced tools
Comparing version 1.12.7 to 1.12.8
{ | ||
"name": "@minkimcello/georgia", | ||
"version": "1.12.7", | ||
"version": "1.12.8", | ||
"description": "BigTest Sample App", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/thefrontside/bigtest.git", |
66
poop.js
@@ -12,3 +12,3 @@ #!/usr/bin/env node | ||
const BIGTEST_DIR = 'bigtest-sample'; | ||
const DELETE_ME_L8R = 'node_modules/@minkimcello/georgia'; | ||
const DELETE_ME_L8R = `${BIGTEST_DIR}/node_modules/@minkimcello/georgia`; | ||
@@ -40,3 +40,3 @@ let yarn = false; | ||
function populate() { | ||
return new Promise((resolve, reject) => { | ||
return new Promise(async (resolve, reject) => { | ||
if (fs.existsSync(BIGTEST_DIR)) { | ||
@@ -46,18 +46,37 @@ reject('bigtest-sample directory already exists'); | ||
fs.mkdirSync(BIGTEST_DIR); | ||
fs.readdir(DELETE_ME_L8R, (e, files) => { | ||
if (e) { | ||
reject(e); | ||
} else { | ||
files.forEach(file => { | ||
console.log('debug', file) | ||
if (file !== 'node_modules') { | ||
if (!yarn && file !== 'yarn.lock') { | ||
ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`); | ||
} else if (yarn && file !== 'package-lock.json'){ | ||
ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`); | ||
} | ||
}; | ||
}); | ||
}; | ||
const packageJson = { | ||
name: 'bigtest-sample', | ||
version: '0.0.0', | ||
private: true, | ||
devDependencies: { | ||
'@minkimcello/georgia': '*' | ||
} | ||
}; | ||
fs.writeFileSync( | ||
`${BIGTESTDIR}/package.json`, | ||
JSON.stringify(packageJson, null, 2) | ||
); | ||
await install(true); | ||
rmrf.sync(`${BIGTEST_DIR}/package.json`); | ||
rmrf.sync(`${BIGTEST_DIR}/yarn.lock`); | ||
const hard_list = ['cypress', 'public', 'src', 'bigtest.json', 'cypress.json', 'package.json']; | ||
hard_list.forEach(file => { | ||
ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`) | ||
}); | ||
rmrf.sync(`${BIGTEST_DIR}/node_modules`); | ||
// fs.readdir(DELETE_ME_L8R, (e, files) => { | ||
// if (e) { | ||
// reject(e); | ||
// } else { | ||
// files.forEach(file => { | ||
// if (file !== 'node_modules') { | ||
// if (!yarn && file !== 'yarn.lock') { | ||
// ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`); | ||
// } else if (yarn && file !== 'package-lock.json'){ | ||
// ncp(`${DELETE_ME_L8R}/${file}`, `${BIGTEST_DIR}/${file}`); | ||
// } | ||
// }; | ||
// }); | ||
// }; | ||
// }); | ||
}; | ||
@@ -68,3 +87,3 @@ resolve(); | ||
function install() { | ||
function install(x) { | ||
return new Promise((resolve, reject) => { | ||
@@ -76,7 +95,10 @@ let command = yarn ? 'yarn' : 'npm'; | ||
}); | ||
install.on('close', () => { | ||
console.log(`installation complete`); | ||
console.log(`go and try it out`); | ||
resolve(); | ||
if(x){ | ||
resolve() | ||
} else { | ||
console.log(`installation complete`); | ||
console.log(`'cd ${BIGTEST_DIR}' and try it out`); | ||
resolve(); | ||
} | ||
}); | ||
@@ -83,0 +105,0 @@ }); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
707075
25176
24