'use strict'; const loggerPartial = require("@joepie91/gulp-partial-logger"); const livereloadPartial = require("@joepie91/gulp-partial-livereload"); const xtend = require("xtend"); const cache = require("gulp-cached"); const riot = require("gulp-riot"); module.exports = function(options) { let cacheKey = (options.cacheKey != null) ? options.cacheKey : "preset"; let riotOptions = (options.riot != null) ? options.riot : {}; let streamList = [ cache(cacheKey), riot(xtend({ type: "babel", template: "jade", style: "scss" }, riotOptions)) ]; if (options.livereload != null) { streamList.push(livereloadPartial(options.livereload)); } return loggerPartial("riot", streamList, { logger: { basePath: options.basePath } }); }