gulp-autoprefixer

gulp autoprefixer giving me a promise error

二次信任 提交于 2019-12-11 03:34:14
问题 I tried this solution from Gulp Autoprefixer Not Working but it's not working out for me. The code that I used is: "use strict"; var gulp = require('gulp'); var sass = require('gulp-sass'); var prefix = require('gulp-autoprefixer'); var minify = require('gulp-minify-css'); var plumber = require('gulp-plumber'); function onError(err) { console.log(err); } gulp.task('sass', function(){ return gulp.src('src/style.scss') .pipe(sass()) .pipe(prefix({browsers:['last 2 versions']})) .pipe(minify())

Gulp SASS Sourcemap sources are incorrect

我的梦境 提交于 2019-12-06 05:07:41
问题 I am struggling to get my SASS sourcemaps to work correctly. The problem seems to be the "sources" attribute within the sourcemap and how my SASS files are nested. I have a Gulp task that compiles SASS to CSS. Here is an example of that var paths = { styles: { src: './Stylesheets/SCSS/', files: './Stylesheets/SCSS/**/*.scss', dest: './Stylesheets/CSS/' } } gulp.task('compile-sass', function (){ return gulp.src(paths.styles.files) .pipe(sourcemaps.init()) .pipe(sass({ outputStyle: 'compressed'

Gulp SASS Sourcemap sources are incorrect

旧时模样 提交于 2019-12-04 11:07:21
I am struggling to get my SASS sourcemaps to work correctly. The problem seems to be the "sources" attribute within the sourcemap and how my SASS files are nested. I have a Gulp task that compiles SASS to CSS. Here is an example of that var paths = { styles: { src: './Stylesheets/SCSS/', files: './Stylesheets/SCSS/**/*.scss', dest: './Stylesheets/CSS/' } } gulp.task('compile-sass', function (){ return gulp.src(paths.styles.files) .pipe(sourcemaps.init()) .pipe(sass({ outputStyle: 'compressed', includePaths : [paths.styles.src] })) .pipe(prefix({ browsers: ['last 2 Chrome versions'], cascade: