gulp 4 编译 less

var { series, src, dest, watch } = require("gulp");

var less = require("gulp-less");

function lessTask() {

  return src("less/*.less").pipe(less()).pipe(dest("public/css"));

}

function watchTask() {

  return watch("less/*.less", lessTask);

}

exports.watch = series(lessTask, watchTask);

exports.default = async () => {

  lessTask();

};

你可能感兴趣的:(gulp 4 编译 less)