我正在尝试让 Gulp Vinyl FTP 上传特定的 Wordpress 主题目录,这是部署命令。
gulp.task('deploy', function() {
console.log('uploading to server');
var conn = ftp.create({
host: '',
user: '',
password: '',
parallel: 3,
log: gutil.log
});
var globs = [
'wp-content/themes/theme2018/**/*',
'wp-content/themes/theme2018/*',
// '**/*',
// '*',
// '!node_modules/**',
// '!node_modules/',
// '!.env'
];
return gulp.src( globs, { base: '.', buffer: false } )
.pipe( conn.newer( '/public_html' ) ) // only upload newer files
.pipe( conn.dest( '/public_html' ) )
})
在我运行部署命令后,它显示的是:
[11:20:34] Using gulpfile D:\Cloud\Work\Website.com\gulpfile.js
[11:20:34] Starting 'deploy'...
uploading to server
[11:20:34] CONN
[11:20:35] READY
[11:20:35] MLSD /public_html
[11:20:35] Finished 'deploy' after 786 ms
但是,没有上传主题目录中的文件。
任何想法我做错了什么?