When I configured gulp and running task for scss, I am getting Error saying ReferenceError: sass is not defined even I have installed gulp-scss and declared in gulp.js
var gulp = require('gulp');
var scss = require('gulp-sass');
gulp.task('sass', function () {
return gulp.src('app/scss/mystyles.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('app/css'));
});
gulp.task('default', ['sass']);
Please suggest me what I am doing wrong.
You are require
ing gulp-sass
as scss
, so either
var sass = ...
, orscss()
.