当前位置:网站首页>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);
边栏推荐
猜你喜欢
随机推荐
C语言入门笔记 —— 初识
栈区中越界可能造成的死循环可能
虚幻引擎5都有哪些重要新功能?
如何使用Houdini进行程序化优化?
Blender软件介绍与使用心得
腾讯云消息队列CMQ
每日一题-下一个排列-0723
framebuffer应用编程及文字显示(2)
PVE 直通硬盘到TrueNAS
IJCAI 2022|Boundary-Guided Camouflage Object Detection Model BGNet
spark源码-RPC通信机制
入门文档05 使用cb()指示当前任务已完成
Unity huatuo 革命性热更系列1.2 huatuo热更环境安装与示例项目
【Day1】VMware软件安装
来来来,一文让你读懂Cocos Creator如何读写JSON文件
【UiPath2022+C#】UiPath控制流程概述
[Day1] (Super detailed steps) Build a soft RAID disk array
每日一题-两数相加-0711
通过单总线调用ds18b20的问题
Autoware--北科天绘rfans激光雷达使用相机&激光雷达联合标定文件验证点云图像融合效果