Skip to content

Commit 488fed9

Browse files
author
hirsch88
committed
Hide generation of the ormconfig & tsconfig file
1 parent d5bac8c commit 488fed9

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

commands/ormconfig.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as dotenv from 'dotenv';
22
dotenv.config();
33

44
import * as path from 'path';
5-
import * as Chalk from 'chalk';
65
import * as jsonfile from 'jsonfile';
76
import { env } from '../src/core/env';
87

@@ -24,11 +23,7 @@ const content = {
2423
const filePath = path.join(process.cwd(), 'ormconfig.json');
2524
jsonfile.writeFile(filePath, content, { spaces: 2 }, (err) => {
2625
if (err === null) {
27-
const chalk = Chalk.default;
28-
console.log('👍 ',
29-
chalk.gray.underline('generated:'),
30-
chalk.blue.bold('ormconfig.json')
31-
);
26+
process.exit(0);
3227
} else {
3328
console.error('Failed to generate the ormconfig.json', err);
3429
process.exit(1);

commands/tsconfig.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as path from 'path';
2-
import * as Chalk from 'chalk';
32
import * as jsonfile from 'jsonfile';
43
import * as tsconfig from '../tsconfig.json';
54

@@ -12,13 +11,9 @@ content.include = [
1211
const filePath = path.join(process.cwd(), 'tsconfig.build.json');
1312
jsonfile.writeFile(filePath, content, { spaces: 2 }, (err) => {
1413
if (err === null) {
15-
const chalk = Chalk.default;
16-
console.log('👍 ',
17-
chalk.gray.underline('generated:'),
18-
chalk.blue.bold('tsconfig.build.json')
19-
);
14+
process.exit(0);
2015
} else {
21-
console.error('Failed to generate the otsconfig.build.json', err);
16+
console.error('Failed to generate the tsconfig.build.json', err);
2217
process.exit(1);
2318
}
2419
});

0 commit comments

Comments
 (0)