当前位置:网站首页>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);
边栏推荐
猜你喜欢
随机推荐
D41_缓冲池
错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
【UiPath2022+C#】UiPath 循环
OpenCV3.0 兼容VS2010与VS2013的问题
入门文档09 独立的watch
链表章6道easy总结(leetcode)
虚幻引擎5都有哪些重要新功能?
spark源码-任务提交流程之-1-sparkSubmit
Spark源码-任务提交流程之-6.2-sparkContext初始化-TaskScheduler任务调度器
电子产品量产工具(2)- 输入系统实现
【Day1】VMware软件安装
入门文档03 区分开发与生产环境(生产环境才执行‘热更新’)
spark源码-任务提交流程之-2-YarnClusterApplication
【Day8】(超详细步骤)使用LVM扩容
【UiPath2022+C#】UiPath 练习-数据操作
每日一题-下一个排列-0723
无影云桌面
游戏引擎除了开发游戏还能做什么?
通过单总线调用ds18b20的问题
spark源码-任务提交流程之-3-ApplicationMaster









