当前位置:网站首页>Getting Started Documentation 12 webserve + Hot Updates
Getting Started Documentation 12 webserve + Hot Updates
2022-08-05 06:08:00 【dongsdh】
Starting the project only executes the serve task once
Do not execute serve after modifying the content, otherwise there will be a prompt
const { src, dest, series, watch, parallel } = require("gulp");const del = require("del");const webserver = require("gulp-webserver");function clean(cb) {console.log('cleanup');return del("./dist/"); //Delete the specified directory and prepare for the dump filecb()}function js(cb) {console.log('processing js');src("./src/js/*.js").pipe(dest("./dist/js"));cb();}function html(cb) {console.log('processing html');src("./src/html/*.html").pipe(dest("./dist/html"));cb();}function serve() {src("./").pipe(webserver({host: "localhost",port: 366,livereload: true, // live reloadopen: "dist/html/my.html", // file opened by default browser at startupdirectoryListing: {enable: true,path: "./dist/html",}}));}const Run = series(clean,parallel(js,html))watch(['./src/'], Run);exports.default = series(Run,serve);
边栏推荐
猜你喜欢
随机推荐
你要找的cocos面试答案都在这里了!
Cocos Creator小游戏案例《棍子士兵》
电子产品量产工具(3)- 文字系统实现
spark源码-任务提交流程之-3-ApplicationMaster
每日一题-下一个排列-0723
[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
PVE 直通硬盘到TrueNAS
每日一题-括号生成-0721
【Day5】软硬链接 文件存储,删除,目录管理命令
【UiPath2022+C#】UiPath变量和参数
入门文档09 独立的watch
lvm逻辑卷及磁盘配额
OpenCV3.0 兼容VS2010与VS2013的问题
Contextual non-local alignment of full-scale representations
spark源码-RPC通信机制
【Day6】文件系统权限管理 文件特殊权限 隐藏属性
手把手教你搭建小程序
IJCAI 2022|Boundary-Guided Camouflage Object Detection Model BGNet
【机器学习】1单变量线性回归
D39_坐标转换









