gulp sass sourcemaps and autoprefixer not working -


i unable autoprefixer working gulp sass. here gulpfile.js:

'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); gulp.task('sass', function () {   gulp.src('./sass/**/*.scss')     .pipe(sourcemaps.init())     .pipe(sass().on('error', sass.logerror))     .pipe(sourcemaps.write())     .pipe(autoprefixer({ browsers: ['last 2 versions' ]}))     .pipe(gulp.dest('./css/')); }); gulp.task('watch', function () {   gulp.watch('./sass/**/*.scss', ['sass']); }); gulp.task('default', function () {   gulp.watch('./sass/**/*.scss', ['sass']); }); 

i followed solution in related question couldn't done. here link : link

i able achieve sourcemaps , autoprefix functionality thought of sharing. here gulpfile.js :

'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); gulp.task('sass', function () {   gulp.src('./sass/**/*.scss')     .pipe(sourcemaps.init())     .pipe(sass().on('error', sass.logerror))     .pipe(sourcemaps.write())     .pipe(autoprefixer())     .pipe(gulp.dest('./css/')); }); gulp.task('watch', function () {   gulp.watch('./sass/**/*.scss', ['sass']); }); gulp.task('default', function () {   gulp.watch('./sass/**/*.scss', ['sass']); }); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -