File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 22
22
"js-yaml" : " ^3.9.1" ,
23
23
"jsonwebtoken" : " ^7.4.1" ,
24
24
"lodash" : " ^4.17.4" ,
25
+ "open" : " 0.0.5" ,
25
26
"ora" : " ^1.2.0" ,
26
27
"tar-fs" : " ^1.15.2" ,
27
28
"yargs" : " ^8.0.1"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const path = require('path');
7
7
const fs = require ( 'fs' ) ;
8
8
const ora = require ( 'ora' ) ;
9
9
const Table = require ( 'cli-table' ) ;
10
+ const open = require ( 'open' ) ;
10
11
11
12
// my modules
12
13
const { userConfig, isLoggedIn, logout} = require ( '../config' ) ;
@@ -47,6 +48,10 @@ exports.builder = {
47
48
alias : 'u' ,
48
49
description : 'Update current project instead of simple deployment' ,
49
50
} ,
51
+ open : {
52
+ alias : 'o' ,
53
+ description : 'Open deployed project in browser after upload'
54
+ }
50
55
} ;
51
56
exports . handler = async ( args = { } ) => {
52
57
const deployToken = args . token ;
@@ -133,6 +138,9 @@ exports.handler = async (args = {}) => {
133
138
const formattedServices = formatServices ( res . deployments ) ;
134
139
formattedServices . forEach ( ( { name, domain, host} ) => {
135
140
resultTable . push ( [ name , domain , host ] ) ;
141
+ if ( args . open ) {
142
+ open ( 'http://' + domain ) ;
143
+ }
136
144
} ) ;
137
145
138
146
// draw table
You can’t perform that action at this time.
0 commit comments