2021年3月8日

摘要: //clean任务 const clean = () =>{ return del(['dist','temp']) } 将style、script、page放到temp临时目录中 例如: const style = () =>{ return src('src/assets/styles/*scs 阅读全文
posted @ 2021-03-08 19:24 phantom_yy 阅读(74) 评论(0) 推荐(0)
 
摘要: 1、安装压缩插件 yarn add gulp-htmlmin gulp-uglify gulp-clean-css --dev 2、安装判断读取流类型的插件 yarn add gulp-if --dev 3、使用 const useref = () => { return src('dist/*.h 阅读全文
posted @ 2021-03-08 18:49 phantom_yy 阅读(69) 评论(0) 推荐(0)
 
摘要: 1、安装useref插件 yarn add gulp-useref --dev 2、使用 const useref = () => { return src('dist/*.html',{base:'dist'}) .pipe(plugins.useref({searchPath:['dist',' 阅读全文
posted @ 2021-03-08 18:18 phantom_yy 阅读(116) 评论(0) 推荐(0)
 
摘要: 1、使用watch监视开发过程中的变化 const {src,dest,parallel,series,watch} = require('gulp'); 2、在serve任务中使用 //serve任务 //notify:页面右上角browserSync的小提示,开着有时候会影响页面调试 //por 阅读全文
posted @ 2021-03-08 17:45 phantom_yy 阅读(110) 评论(0) 推荐(0)
 
摘要: 用于在开发阶段调试应用。 1、安装browser-sync模块,提供给我们一个开发服务器 yarn add browser-sync --dev 2、在gulp中使用这个模块 //serve任务 //notify:页面右上角browserSync的小提示,开着有时候会影响页面调试 //port:端口 阅读全文
posted @ 2021-03-08 16:38 phantom_yy 阅读(70) 评论(0) 推荐(0)