From 68643a7b9324175070dbd7dbf43720e26583c8d3 Mon Sep 17 00:00:00 2001 From: Dan Mindru Date: Wed, 25 May 2016 22:30:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=8C=20SCSS=20ready=20to=20go,=20closes?= =?UTF-8?q?=20#11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + tasks/sass.js | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c85189e..1d9a754 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "gulp-postcss": "^6.1.1", "gulp-preprocess": "~2.0.0", "gulp-rename": "^1.2.2", + "gulp-sass": "^2.3.1", "q": "~1.4.1", "wrench": "~1.5.8" }, diff --git a/tasks/sass.js b/tasks/sass.js index 694b65d..07994a4 100644 --- a/tasks/sass.js +++ b/tasks/sass.js @@ -1,10 +1,19 @@ 'use strict'; -var gulp = require('gulp'); +var gulp = require('gulp'), + autoprefixer = require('gulp-autoprefixer'), + sass = require('gulp-sass'), + rename = require('gulp-rename'); function sassTask(options){ - gulp.task('sass', function(){ - //todo + gulp.task('sass', ['dupe'], function(){ + return gulp.src(options.workingDir + '/**/*.scss') + .pipe(sass()) + .pipe(autoprefixer({ + browsers: ['last 5 versions'] + })) + .pipe(rename({ extname: '.css' })) + .pipe(gulp.dest(options.workingDir)); }); }