File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,12 +4,17 @@ const { program } = require("commander");
44const pjson = require ( "../package.json" ) ;
55const setup = require ( "./setup" ) ;
66
7- program
8- . version ( pjson . version )
9- . option ( "-c, --config <path>" , "set config path. defaults to ./bitfact.conf" ) ;
7+ program . version ( pjson . version ) ;
108
119program
1210 . command ( "setup" )
11+ . description ( "run setup command" )
12+ . action ( ( ) => {
13+ setup . prompt ( ) ;
14+ } ) ;
15+
16+ program
17+ . command ( "text" )
1318 . description ( "run setup commands for all envs" )
1419 . option ( "-provider, --setup_mode [mode]" , "Which setup mode to use" )
1520 . option ( "-privateKey, --setup_mode [mode]" , "Which setup mode to use" )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ module.exports = {
3838 if ( fs . existsSync ( config . CONFIG_FILE ) ) {
3939 console . log (
4040 chalk . red (
41- `Config file already exists, "${ config . CONFIG_FILE } ". You must manually remove this file before proceeding .`
41+ `Config already exists, "${ config . CONFIG_FILE } ". Manually remove this file and retry .`
4242 )
4343 ) ;
4444 exit ( ) ;
@@ -47,6 +47,6 @@ module.exports = {
4747 const response = await prompts ( questions ) ;
4848 const data = JSON . stringify ( response ) ;
4949 fs . writeFileSync ( config . CONFIG_FILE , data ) ;
50- console . log ( chalk . green ( "Setup file created at: " + config . CONFIG_FILE ) ) ;
50+ console . log ( chalk . green ( `Config file created, " ${ config . CONFIG_FILE } "` ) ) ;
5151 } ,
5252} ;
You can’t perform that action at this time.
0 commit comments