2.1.8 • Published 8 years ago
vfe-deploy v2.1.8
vfe-deploy
vfe deploy module for deploying files to remote server.
API
vdeploy(options, callback)
Deploy files to remote server.
Return: Promise
Options:
- src <String|Array> Likes gulp.src(), specified files those need to deploy. See detail
- base The folder relative to the cwd. This is used to determine the file names. Can also be a function that takes in a file and returns a folder path. See detail.
- host which remote server to deploy
path what path of remote server to deploy
Noti: Root of diretrory should not naming "packages", otherwise result in error
proxy <Boolean|Object>
optional
, if remote server can't not access directly, using vfe server, params:- server Hostname of vfe server, path and host, without protocal, default "vfe.oa.com"
- app_id
optional
, specified the app_id that created by vfe server, default "_deploy"
Example:
var vdeploy = require('vfe-deploy')
vdeploy({
src: ['index.js', 'views'],
host: "10.xx.xx.x:8xxx",
path: "/data/user/tmp/"
}, function (err) {
err && console.error('Error', err)
})
vdeploy.upload(options, callback)
Upload files to vfe server.
Return: Promise
Options:
- src <String|Array> Likes gulp.src(), specified files those need to upload
- server which remote server to upload
- app_id appid that created by vfe server
- path what path of remote server to upload
Example:
var vdeploy = require('vfe-deploy')
vdeploy.upload({
src: ['index.js', 'views'],
server: "10.xx.xx.x:8xxx",
app_id: 'xxxx',
path: "/"
}, function (err) {
err && console.error('Error', err)
})
vdeploy.untar(options, callback)
Extract file of remote server.
Return: Promise
Options:
- host
<String>
Server host of target file. - server
<String>
Proxy server host, default "vfe.oa.com".Optional
- file
<String>
Absolute path of the un-tar file in remote server, could be tar.gz. - path
<String>
Extract tar file to the specified path, could be a relative path of file. - clean
<Boolean>
Whether remove tar file or not after extracting, defaultfalse
.Optional
Example:
var vdeploy = require('vfe-deploy')
vdeploy.untar({
host: "10.xx.xx.x:8xxx"
server: "10.xx.xx.x:8xxx",
file: "/absolute_path_to_tar_file",
path: "./tmp"
}).then(function () {
})
2.1.8
8 years ago
2.1.7
8 years ago
2.1.6
9 years ago
2.1.5
9 years ago
2.1.4
9 years ago
2.1.3
9 years ago
2.1.2
9 years ago
2.1.1
9 years ago
2.1.0
9 years ago
2.0.2
9 years ago
2.0.1
9 years ago
2.0.0
9 years ago
1.0.7
10 years ago
1.0.6
10 years ago
1.0.5
10 years ago
1.0.4
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago