File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ var semver = require('semver');
9
9
exports . usage = "重载插件" ;
10
10
11
11
exports . setOptions = function ( optimist ) {
12
- optimist . alias ( 'h ' , 'host ' ) ;
13
- optimist . describe ( 'h ' , '拉取插件服务地址' ) ;
12
+ optimist . alias ( 's ' , 'service ' ) ;
13
+ optimist . describe ( 's ' , '拉取插件服务地址' ) ;
14
14
} ;
15
15
16
16
exports . run = function ( options ) {
17
- var host = 'http://' + ( options . h || options . host || '192.168.237.71:9999 /download' ) ;
17
+ var servicePath = options . s || options . service || 'http://l-uedmobile0.h.dev.cn0.qunar.com:3000 /download' ;
18
18
19
19
// 重载全局插件
20
20
Manager . reloadRC ( ) ;
@@ -41,7 +41,7 @@ exports.run = function (options) {
41
41
// 下载
42
42
var tarName = depName + '@' + version + '.tar.gz' ;
43
43
var extractPath = sysPath . join ( process . cwd ( ) , './node_modules/' , tarName ) ;
44
- var downloadPath = host + '/' + tarName ;
44
+ var downloadPath = servicePath + '/' + tarName ;
45
45
var downloadStream = request ( downloadPath ) . on ( 'response' , function ( response ) {
46
46
log ( '[' + response . statusCode + '] downloading ' + downloadPath ) ;
47
47
} ) . pipe ( fs . createWriteStream ( extractPath ) ) ;
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ const semver = require('semver')
9
9
exports . usage = "重载插件"
10
10
11
11
exports . setOptions = ( optimist ) => {
12
- optimist . alias ( 'h ' , 'host ' )
13
- optimist . describe ( 'h ' , '拉取插件服务地址' )
12
+ optimist . alias ( 's ' , 'service ' )
13
+ optimist . describe ( 's ' , '拉取插件服务地址' )
14
14
} ;
15
15
16
16
exports . run = ( options ) => {
17
- const host = 'http://' + ( options . h || options . host || '192.168.237.71:9999 /download' )
17
+ const servicePath = options . s || options . service || 'http://l-uedmobile0.h.dev.cn0.qunar.com:3000 /download'
18
18
19
19
// 重载全局插件
20
20
Manager . reloadRC ( ) ;
@@ -39,7 +39,7 @@ exports.run = (options) => {
39
39
// 下载
40
40
const tarName = depName + '@' + version + '.tar.gz'
41
41
const extractPath = sysPath . join ( process . cwd ( ) , './node_modules/' , tarName )
42
- const downloadPath = host + '/' + tarName
42
+ const downloadPath = servicePath + '/' + tarName
43
43
const downloadStream = request ( downloadPath )
44
44
. on ( 'response' , function ( response ) {
45
45
log ( `[${ response . statusCode } ] downloading ${ downloadPath } ` )
You can’t perform that action at this time.
0 commit comments