当前位置:网站首页>Getting Started Doc 06 Adding files to a stream
Getting Started Doc 06 Adding files to a stream
2022-08-05 06:09:00 【dongsdh】
This is an optimization of the introductory document 04,
After converting all scss files into css files
Add other css files to the stream
Let them merge together, compress,,,
Complete a task and get the final desired result
const { src, dest, series, watch, parallel } = require("gulp");// // Convert scss to cssconst sass = require("gulp-sass")(require("sass"));//mergeconst concat = require('gulp-concat');//compressionconst cssmin = require("gulp-cssmin");function clean(cb) {console.log('clean up dist');cb();}function js(cb) {console.log('processing js');cb();}function css(cb) {console.log('processing css');src('src/scss/**/*.scss').pipe(sass()) //scss converted to css.pipe(src('src/css/**/*.css'))//The newly added file will only perform the task of later merging and compression.pipe(concat('app.css')) //Merge css, you must take a merged file name.pipe(cssmin()) //compression.pipe(dest('dist/'));cb();}function img(cb) {console.log('processing img');cb();}function build(cb) {console.log('Packaging');cb();}exports.default = series(clean, js, css, img, build);
边栏推荐
猜你喜欢

Unity中的GetEnumerator 方法及MoveNext、Reset方法

【Day1】(超详细步骤)构建软RAID磁盘阵列

UE4动画雨滴材质制作教程

错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘

dsf5.0新建页面访问时重定向到首页的问题

C语言的一些小常识

Autoware中安装Yolo3目标检测模块遇到的问题

UE5再次更新!扫描或手动建模面部模型可直接转为绑定好的Metahuman

“元宇宙”是个啥?都有哪些大招?

如何使用Houdini进行程序化优化?
随机推荐
Spark源码-任务提交流程之-6-sparkContext初始化
C语言的一些小常识
UE4动画雨滴材质制作教程
dsf5.0新建页面访问时重定向到首页的问题
【Day8】磁盘及磁盘的分区有关知识
[Day8] (Super detailed steps) Use LVM to expand capacity
【机器学习】1单变量线性回归
网站ICP备案是什么呢?
入门文档06 向流(stream)中添加文件
Account and Permission Management
入门文档07 分阶段输出
入门文档05-2 使用return指示当前任务已完成
电子产品量产工具(1)- 显示系统实现
C语言查看大小端(纯代码)
Unity常用模块设计 : Unity游戏排行榜的制作与优化
每日一题-字典
函数在开发环境中的应用(简易实例)
C语言入门笔记 —— 函数(1)
TCP/IP四层模型
每日一题-最长回文子串-0714