1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | 'use strict';
|
8 |
|
9 | const chalk = require( 'chalk' );
|
10 | const envinfo = require( 'envinfo' );
|
11 | const clearConsole = require( './consoleClear' );
|
12 |
|
13 | module.exports = program => {
|
14 |
|
15 | if ( program.debug ) {
|
16 | clearConsole();
|
17 |
|
18 | console.log(
|
19 | '\n🔰 ' +
|
20 | chalk.black.bgYellow( ' Printing the debug env info below: \n\n' ) +
|
21 | chalk.dim( ' This may take a couple of seconds...' )
|
22 | );
|
23 |
|
24 |
|
25 | envinfo.print( {
|
26 | packages: [ 'cgb-scripts' ],
|
27 | cpu: true,
|
28 | duplicates: true,
|
29 | browsers: true,
|
30 | noNativeIDE: true,
|
31 | } );
|
32 |
|
33 | console.log(
|
34 | '\n✅ ' +
|
35 | chalk.black.bgGreen( ' Done ' ) +
|
36 | chalk.dim( ' You can copy paste this info to share it...\n' )
|
37 | );
|
38 |
|
39 | process.exit( 0 );
|
40 | }
|
41 | };
|