Skip to content

Commit d83563b

Browse files
committed
Merge branch 'develop', prepare 0.17.0
2 parents 955b1c0 + f3be52f commit d83563b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"js-yaml": "^3.9.1",
2323
"jsonwebtoken": "^7.4.1",
2424
"lodash": "^4.17.4",
25+
"open": "0.0.5",
2526
"ora": "^1.2.0",
2627
"tar-fs": "^1.15.2",
2728
"yargs": "^8.0.1"

src/commands/deploy.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const path = require('path');
77
const fs = require('fs');
88
const ora = require('ora');
99
const Table = require('cli-table');
10+
const open = require('open');
1011

1112
// my modules
1213
const {userConfig, isLoggedIn, logout} = require('../config');
@@ -47,6 +48,10 @@ exports.builder = {
4748
alias: 'u',
4849
description: 'Update current project instead of simple deployment',
4950
},
51+
open: {
52+
alias: 'o',
53+
description: 'Open deployed project in browser after upload'
54+
}
5055
};
5156
exports.handler = async (args = {}) => {
5257
const deployToken = args.token;
@@ -133,6 +138,9 @@ exports.handler = async (args = {}) => {
133138
const formattedServices = formatServices(res.deployments);
134139
formattedServices.forEach(({name, domain, host}) => {
135140
resultTable.push([name, domain, host]);
141+
if(args.open){
142+
open('http://' + domain);
143+
}
136144
});
137145

138146
// draw table

0 commit comments

Comments
 (0)