gulp webserver:默认为index.html(如果可用),否则显示目录
这是我目前对gulp Web服务器的设置gulp webserver:默认为index.html(如果可用),否则显示目录,gulp,Gulp,这是我目前对gulp Web服务器的设置 gulp.task('server', function(){ gulp.src('dist/') .pipe(webserver({ open: true, directoryListing: {enable: true}, fallback: 'index.html' })); }); 如果存在index.html,我希望能够默认为index.html,否则显示目录列表 目前这不起作用,有可能吗?我最终使用了具有
gulp.task('server', function(){
gulp.src('dist/')
.pipe(webserver({
open: true,
directoryListing: {enable: true},
fallback: 'index.html'
}));
});
如果存在index.html,我希望能够默认为index.html,否则显示目录列表
目前这不起作用,有可能吗?我最终使用了具有此功能的,并触发了它
gulp.src()
.pipe(shell(([
'ws -d dist/'
]))