You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
654 B
JavaScript
30 lines
654 B
JavaScript
'use strict';
|
|
|
|
const loggerPartial = require("@joepie91/gulp-partial-logger");
|
|
const livereloadPartial = require("@joepie91/gulp-partial-livereload");
|
|
|
|
const cache = require("gulp-cached");
|
|
const sass = require("gulp-sass");
|
|
|
|
module.exports = function(options = {}) {
|
|
let cacheKey = (options.cacheKey != null) ? options.cacheKey : "preset";
|
|
|
|
let streamList = [];
|
|
|
|
if (cacheKey !== false) {
|
|
streamList.push(cache(cacheKey));
|
|
}
|
|
|
|
streamList.push(sass());
|
|
|
|
if (options.livereload != null) {
|
|
streamList.push(livereloadPartial(options.livereload));
|
|
}
|
|
|
|
return loggerPartial("scss", streamList, {
|
|
logger: {
|
|
basePath: options.basePath
|
|
}
|
|
});
|
|
}
|