Skip to content

Commit 1c171eb

Browse files
committed
Enter success information in the generator
1 parent 5a17d78 commit 1c171eb

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/generators/ControllerGenerator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ if (controllerName) {
3333
target,
3434
replaceMask(contentFile, { name: controllerName })
3535
);
36+
37+
console.info(`\x1b[36mCreating a controller ${controllerName}`, '\x1b[0m');
38+
console.info(`Path: ${target}`, '\x1b[0m\n');
3639
} catch (err) {
3740
console.log(`\x1b[31m${err}\x1b[0m`);
3841
}

src/generators/ProjectGenerator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ if (projectName) {
3232
createPackageJson(target, projectName);
3333
installDependencies(target);
3434
initializeGit(projectName);
35+
36+
console.info(`\x1b[36mCreating a project ${projectName}`, '\x1b[0m');
37+
console.info(`Path: ${target}`, '\x1b[0m\n');
3538
} catch (err) {
3639
console.log(`\x1b[31m${err}\x1b[0m`);
3740
}

src/generators/ScalarGenerator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ if (scalarName) {
3030
name: scalarName.replace('Scalar', '')
3131
})
3232
);
33+
34+
console.info(`\x1b[36mCreating a scalar ${scalarName}`, '\x1b[0m');
35+
console.info(`Path: ${target}`, '\x1b[0m\n');
3336
} catch (err) {
3437
console.log(`\x1b[31m${err}\x1b[0m`);
3538
}

src/generators/ValidatorGenerator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ if (validatorName) {
2828
try {
2929
const contentFile = fs.readFileSync(source).toString();
3030
fs.writeFileSync(target, replaceMask(contentFile, { name: validatorName }));
31+
32+
console.info(`\x1b[36mCreating a validator ${validatorName}`, '\x1b[0m');
33+
console.info(`Path: ${target}`, '\x1b[0m\n');
3134
} catch (err) {
3235
console.log(`\x1b[31m${err}\x1b[0m`);
3336
}

0 commit comments

Comments
 (0)