"use strict"; var del = require('del') var gulp = require("gulp"); var coffee = require("gulp-coffee"); var sass = require("gulp-sass"); // clean task gulp.task("clean", function () { return del(["src/static/coffee/**/*.coffee", "src/static/js/**/*.js"]); }); // coffee task gulp.task("coffee", function () { return gulp.src("./static/src/coffee/*.coffee") .pipe(coffee()) .pipe(gulp.dest("./static/src/js")); }); // coffee watch task gulp.task("coffee:watch", function () { return gulp.watch("./static/src/coffee/*.coffee", ["clean", "coffee"]); }); // sass task gulp.task("sass", function () { return gulp.src("./static/src/sass/**/*.sass") .pipe(sass({ indentedSyntax: true, indentType: "tab", indentWidth: 1, outputStyle: "expanded" }).on("error", sass.logError)) .pipe(gulp.dest("./static/src/css")); }); // sass watch task gulp.task("sass:watch", function () { return gulp.watch("./static/src/sass/**/*.sass", ["clean", "sass"]); }); // sass default tasks gulp.task("default", ["coffee", "sass"]); gulp.task("default:watch", ["coffee:watch", "sass:watch"]);