'use strict';

var gulp = require('gulp');
var sass = require('gulp-dart-sass');

// compile SASS stylesheets
function stylesheets() {
  return gulp.src('./assets/sass/*.sass')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./public/css'));
}

// watch for assets that need compiling
function watch() {
  gulp.watch('./assets/sass/*.sass', stylesheets);
}

// export commands
exports.sass = stylesheets;
exports.watch = watch;
