Skip to content

Commit

Permalink
feat: add option to install nodes modules
Browse files Browse the repository at this point in the history
fix project name and modules execution time
  • Loading branch information
kikoane committed Dec 6, 2019
1 parent 3881324 commit 0839844
Show file tree
Hide file tree
Showing 3 changed files with 1,457 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,15 @@ async function getQueriesResponse() {
}
let ret = await qoa.prompt([row]);

while (row.handle === 'projectname') {
while (row.handle === "projectname") {
ret.projectname = filterPackageName(ret.projectname);
if (ret.projectname.length <= 1 || ret.projectname.length > 214) {
console.log(red().bold("The project name must be of length 2<>214"));
ret = await qoa.prompt([row]);
}
else
else {
break;
}
}

if (row.handle === "testfw" && ret.testfw === "jest") {
Expand Down Expand Up @@ -167,7 +168,6 @@ async function main() {
}

// Check if the developer want to install nodes modules
console.log (response);
if (response.modules === false) {
console.log("Nodes modules are required to run the project.");
process.exit(0);
Expand Down Expand Up @@ -361,7 +361,7 @@ async function main() {
child.once("close", resolve);
child.once("error", reject);
});
const executeTimeMs = green().bold(`${(ms(performance.now() - start))}`);
const executeTimeMs = green().bold(`${ms(performance.now() - start)}`);
spinner.succeed(white().bold(`Packages installed in ${executeTimeMs}`));
}
catch (err) {
Expand Down
Loading

0 comments on commit 0839844

Please sign in to comment.