gulp-sass 安装 gulp 编译 scss 文件
作者:互联网
下载依赖
npm install gulp-sass sass
gulpfile.js
const { src, dest, series, watch } = require('gulp')
const scss = require('gulp-sass')(require('sass'))
const devPath = './src/'
const outputPath = './pages/'
function handleScss() {
return src(devPath + 'scss/**/*.scss')
.pipe(scss())
.pipe(dest(outputPath + 'test'))
}
function watchFun() {
return watch(devPath + '**/*', series(handleScss))
}
exports.default = watchFun
标签:scss,src,const,sass,devPath,gulp 来源: https://www.cnblogs.com/kebaoye/p/16058231.html