1.首先要安装gulp插件
npm install gulp
npm install --save-dev gulp-ssh
2.然后在你的项目里面创建一个文件gulpfile.js
gulpfile.js代码如下:
const gulp = require('gulp')
const GulpSSH = require('gulp-ssh')
// 需要上传到服务器的路径
const remotePath = 'xxxxxx'
const config = {
ssh: {
host: 'xxxxx', //服务器host
port: 22, //服务器端口,这个不用改
username: