当前位置:网站首页>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);
边栏推荐
- 每日一题-删除链表的倒数第 N 个结点-0718
- 错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
- LeetCode刷题之第33题
- Getting Started Doc 08 Conditional Plugins
- spark算子-parallelize算子
- OpenCV3.0 兼容VS2010与VS2013的问题
- spark算子-map vs mapPartitions算子
- 【Day5】软硬链接 文件存储,删除,目录管理命令
- 电子产品量产工具(2)- 输入系统实现
- URP渲染管线实战教程系列 之URP渲染管线实战解密(一)
猜你喜欢
随机推荐
【UiPath2022+C#】UiPath If条件语句
C语言—扫雷的实现
Getting Started 11 Automatically add version numbers
【Day1】VMware软件安装
UE4动画雨滴材质制作教程
腾讯内部技术:《轩辕传奇》服务器架构演变
[Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)
入门文档05-2 使用return指示当前任务已完成
LeetCode刷题之第23题
每日一题-寻找两个正序数组的中位数-0713
Spark源码-任务提交流程之-6.2-sparkContext初始化-TaskScheduler任务调度器
【UiPath2022+C#】UiPath数据类型
unity实现第一人称漫游(保姆级教程)
Lua,ILRuntime, HybridCLR(wolong)/huatuo热更对比分析
你要找的cocos面试答案都在这里了!
什么是阿里云·速成美站?
Wireshark抓包及常用过滤方法
每日一题-合并两个有序链表-0720
spark算子-repartition算子
huatuo 革命性热更新解决方案系列1·1 为什么这么NB?huatuo革命Unity热更新








